Hide some i386 stuff from linux68k, linuxppc.

Rename plat/linux/libsys/errno.s to plat/linux386/libsys/trapno.s and
stop building it for linux68k and linuxppc.  It defines symbols for
mach/i386/libem.

In syscalls.h, the numbers after 165 are only for i386, so hide them
from 68k, ppc.  These numbers are unused, because the system calls now
in libsys use the lower numbers.

Also teach the build system that libsys depends on the internal
headers in plat/linux/libsys/*.h
This commit is contained in:
George Koehler 2018-01-08 22:26:24 -05:00
parent 64b50b3a45
commit de2c7c3f25
6 changed files with 11 additions and 2 deletions

View file

@ -174,6 +174,12 @@
#define __NR_mremap 163 #define __NR_mremap 163
#define __NR_setresuid 164 #define __NR_setresuid 164
#define __NR_getresuid 165 #define __NR_getresuid 165
/*
* i386, m68020, powerpc use different numbers after 165.
* This file only has the numbers for i386.
*/
#if defined(__i386)
#define __NR_vm86 166 #define __NR_vm86 166
#define __NR_query_module 167 #define __NR_query_module 167
#define __NR_poll 168 #define __NR_poll 168
@ -324,5 +330,6 @@
#define concat(x, y) x##y #define concat(x, y) x##y
#define MAPPED_SYSCALL(p, n) .define concat(p,n); concat(p,n): xor eax, eax; movb al, concat(__NR_,n); jmp __mapped_syscall #define MAPPED_SYSCALL(p, n) .define concat(p,n); concat(p,n): xor eax, eax; movb al, concat(__NR_,n); jmp __mapped_syscall
#endif /* __i386 */
#endif #endif

View file

@ -6,6 +6,7 @@ acklibrary {
"plat/linux/libsys/*.s", "plat/linux/libsys/*.s",
}, },
deps = { deps = {
"plat/linux/libsys/*.h",
"lang/cem/libcc.ansi/headers+headers", "lang/cem/libcc.ansi/headers+headers",
"plat/linux386/include+headers", "plat/linux386/include+headers",
}, },

View file

@ -6,6 +6,7 @@ acklibrary {
"plat/linux/libsys/*.s", "plat/linux/libsys/*.s",
}, },
deps = { deps = {
"plat/linux/libsys/*.h",
"lang/cem/libcc.ansi/headers+headers", "lang/cem/libcc.ansi/headers+headers",
"plat/linux68k/include+headers", "plat/linux68k/include+headers",
}, },

View file

@ -8,7 +8,6 @@ acklibrary {
"plat/linux/libsys/_hol0.s", "plat/linux/libsys/_hol0.s",
"plat/linux/libsys/close.c", "plat/linux/libsys/close.c",
"plat/linux/libsys/creat.c", "plat/linux/libsys/creat.c",
"plat/linux/libsys/errno.s",
"plat/linux/libsys/execve.c", "plat/linux/libsys/execve.c",
"plat/linux/libsys/getpid.c", "plat/linux/libsys/getpid.c",
"plat/linux/libsys/gettimeofday.c", "plat/linux/libsys/gettimeofday.c",
@ -25,6 +24,7 @@ acklibrary {
"plat/linux/libsys/write.c", "plat/linux/libsys/write.c",
}, },
deps = { deps = {
"plat/linux/libsys/*.h",
"lang/cem/libcc.ansi/headers+headers", "lang/cem/libcc.ansi/headers+headers",
"plat/linuxppc/include+headers", "plat/linuxppc/include+headers",
}, },

View file

@ -19,7 +19,7 @@ acklibrary {
"./sigaction.s", "./sigaction.s",
"./stat.s", "./stat.s",
"./write.s", "./write.s",
"plat/linux/libsys/errno.s", "plat/linux386/libsys/trapno.s",
"plat/osx/libsys/brk.c", "plat/osx/libsys/brk.c",
"plat/osx/libsys/creat.c", "plat/osx/libsys/creat.c",
"plat/osx/libsys/isatty.c", "plat/osx/libsys/isatty.c",