Subject: Re: GENERIC fails on compat_10_sys_semsys etc.
To: None <port-sparc64@netbsd.org, tjg@star.le.ac.uk>
From: None <eeh@netbsd.org>
List: port-sparc64
Date: 05/02/2002 16:27:22
| 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

No, this is absolutely the wrong fix.  It will break 32-bit kernels.

First, update your sources, make, config, and /etc/mk.conf and rebuild the
kernel to be sure you have this lossage for the GENERIC kernel and it's not
some lossage due to out of date files.

If the problem persists then we need to go through the cvs archives
and see who broke this and revert the change.

Eduardo