Subject: GENERIC kernel without COMPAT_NETBSD32 compilation failure
To: NetBSD amd64 <port-amd64@netbsd.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: port-amd64
Date: 04/26/2004 15:02:28
Hi,

Recently, i tried to make a GENERIC amd64 kernel without
COMPAT_NETBSD32 support. But the compilation failed with some
unresolved symbols :

#      link  GENERIC.64/netbsd
/local/src/NetBSD/tool/amd64/bin/x86_64--netbsd-ld -T /local/src/NetBSD/src/sys/arch/amd64/conf/kern.ldscript -Ttext 0xffffffff80100000 -e start -X -o netbsd ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
init_sysent.o(.data+0x1278): undefined reference to `compat_16_sys___sigreturn14'
kern_exec.o(.rodata+0x38): undefined reference to `sigcode'
kern_exec.o(.rodata+0x40): undefined reference to `esigcode'


The problem is that an amd64 kernel without COMPAT_NETBSD32 cannot
currently be compiled when other COMPAT_1x (x <= 6) are present.

Wouldn't it be better to define `compat_16' functions in a separate
file such as `compat_16_machdep.c' (like many others archs do),
instead of `netbsd32_machdep.c' ?


njoly@lanfeust [NetBSD/src]> cat sys/arch/amd64/conf/GENERIC.64
include "arch/amd64/conf/GENERIC"
no options      COMPAT_NETBSD32
njoly@lanfeust [NetBSD/src]> uname -a
NetBSD lanfeust.sis.pasteur.fr 2.0E NetBSD 2.0E (LANFEUST) #3: Mon Apr 26 10:38:55 CEST 2004  njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.