Subject: GENERIC fails on compat_10_sys_semsys etc.
To: None <port-sparc64@netbsd.org>
From: Tim Goodwin <tjg@star.le.ac.uk>
List: port-sparc64
Date: 05/02/2002 15:53:07
I've just tried, for the first time, to build a GENERIC kernel.  The
build failed like this.

    ld -n -T ../../../../arch/sparc64/conf/kern.ldscript -Ttext 01000000 -Tdata 01800000 -e start -X -o netbsd ${SYSTEM_OBJ} vers.o
    init_sysent.o(.data+0xa98):/usr/src/sys/arch/sparc64/compile/GENERIC/../../../../kern/init_sysent.c: undefined reference to `compat_10_sys_semsys'
    init_sysent.o(.data+0xaa8):/usr/src/sys/arch/sparc64/compile/GENERIC/../../../../kern/init_sysent.c: undefined reference to `compat_10_sys_msgsys'
    init_sysent.o(.data+0xab8):/usr/src/sys/arch/sparc64/compile/GENERIC/../../../../kern/init_sysent.c: undefined reference to `compat_10_sys_shmsys'
    *** Error code 1

The appended patch to sys/kern/syscalls.master solves the immediate
problem: I now have an apparently working GENERIC kernel.  Is this the
right way to go?

Tim.

--- syscalls.master     2001/07/01 18:06:11     1.110
+++ syscalls.master     2002/05/02 15:43:03
@@ -332,21 +332,21 @@
 167    UNIMPL
 168    UNIMPL
 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
-#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(alpha)
+#if (defined(SYSVSEM) || !defined(_KERNEL)) && !defined(alpha) && !defined(sparc64)
 169    COMPAT_10       { int sys_semsys(int which, int a2, int a3, int a4, \
                            int a5); } osemsys
 #else
 169    EXCL            1.0 semsys
 #endif
 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
-#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(alpha)
+#if (defined(SYSVMSG) || !defined(_KERNEL)) && !defined(alpha) && !defined(sparc64)
 170    COMPAT_10       { int sys_msgsys(int which, int a2, int a3, int a4, \
                            int a5, int a6); } omsgsys
 #else
 170    EXCL            1.0 msgsys
 #endif
 ; XXX more generally, never on machines where sizeof(void *) != sizeof(int)
-#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(alpha)
+#if (defined(SYSVSHM) || !defined(_KERNEL)) && !defined(alpha) && !defined(sparc64)
 171    COMPAT_10       { int sys_shmsys(int which, int a2, int a3, int a4); } \
                            oshmsys
 #else