Subject: xscale kernel build error
To: None <current-users@netbsd.org>
From: Tim Wiess <twiess@ahaza.com>
List: current-users
Date: 01/09/2002 03:14:20
Hello all,
I've recently been attempting to build a evbarm/iq80310 port from a i386 host.
I've manage to build all the user space apps without any problems, but I'm
getting a strange Makefile error when building the kernel. The error occurs
during the compilation of libkern:

----
making sure the kern library is up to date...
/usr/src/tools/obj.evbarm/tools.NetBSD-1.5ZA-i386/bin/arm--netbsdelf-gcc -D__Net
BSD__ -ffreestanding -g -O2 -march=armv4 -mtune=strongarm -Wall -Wno-main -Wpoin
ter-arith -Wno-uninitialized -I../../../../../../lib/libkern/arch/arm -Devbarm -
I../../. -I../../../../../../arch -I../../../../../.. -nostdinc -DDIAGNOSTIC -DM
AXUSERS=32 -D_KERNEL -D_KERNEL_OPT    -c /usr/src/sys/arch/evbarm/compile/IQ8031
0/lib/kern/../../../../../../lib/libkern/__assert.c
/usr/src/tools/obj.evbarm/tools.NetBSD-1.5ZA-i386/bin/arm--netbsdelf-gcc -D__Net
BSD__ -ffreestanding -g -O2 -march=armv4 -mtune=strongarm -Wall -Wno-main -Wpoin
ter-arith -Wno-uninitialized -I../../../../../../lib/libkern/arch/arm -Devbarm -
I../../. -I../../../../../../arch -I../../../../../.. -nostdinc -DDIAGNOSTIC -DM
AXUSERS=32 -D_KERNEL -D_KERNEL_OPT    -c /usr/src/sys/arch/evbarm/compile/IQ8031
0/lib/kern/../../../../../../lib/libkern/__main.c
/usr/src/tools/obj.evbarm/tools.NetBSD-1.5ZA-i386/bin/arm--netbsdelf-gcc -D__Net
BSD__ -ffreestanding -g -O2 -march=armv4 -mtune=strongarm -Wall -Wno-main -Wpoin
ter-arith -Wno-uninitialized -I../../../../../../lib/libkern/arch/arm -Devbarm -
I../../. -I../../../../../../arch -I../../../../../.. -nostdinc -DDIAGNOSTIC -DM
AXUSERS=32 -D_KERNEL -D_KERNEL_OPT    -c /usr/src/sys/arch/evbarm/compile/IQ8031
0/lib/kern/../../../../../../lib/libkern/bswap64.c
/usr/src/tools/obj.evbarm/tools.NetBSD-1.5ZA-i386/bin/arm--netbsdelf-gcc -x asse
mbler-with-cpp -D_LOCORE -I../../../../../../lib/libkern/arch/arm -Devbarm -I../
../. -I../../../../../../arch -I../../../../../.. -nostdinc -DDIAGNOSTIC -DMAXUS
ERS=32 -D_KERNEL -D_KERNEL_OPT    -c -traditional-cpp -D__NetBSD__ /usr/src/sys/
arch/evbarm/compile/IQ80310/lib/kern/../../../../../../lib/libkern/arch/i386/byt
e_swap_2.S
/usr/src/sys/arch/evbarm/compile/IQ80310/lib/kern/../../../../../../lib/libkern/
arch/i386/byte_swap_2.S: Assembler messages:
/usr/src/sys/arch/evbarm/compile/IQ80310/lib/kern/../../../../../../lib/libkern/
arch/i386/byte_swap_2.S:50: Error: bad instruction `movzwl 4(%esp),%eax'
/usr/src/sys/arch/evbarm/compile/IQ80310/lib/kern/../../../../../../lib/libkern/
arch/i386/byte_swap_2.S:51: Error: bad instruction `rorw $8,%ax'
/usr/src/sys/arch/evbarm/compile/IQ80310/lib/kern/../../../../../../lib/libkern/
arch/i386/byte_swap_2.S:52: Error: bad instruction `ret'
*** Error code 1

Stop.
make: stopped in /usr/src/sys/arch/evbarm/compile/IQ80310/lib/kern
*** Error code 1

Stop.
make: stopped in /usr/src/sys/arch/evbarm/compile/IQ80310
----

The strange thing about this of course is that it is referencing the i386 code
instead of the arm code. I've made a quick pass through the makefile chain but
I haven't noticed anything unusual. I also did some @echo tests in the
Makefiles, and all the *ARCH values are as they should be...

Anyone have any suggestions as to what might be causing this?

tim