Subject: Cross building NetBSD-current for sparc fails
To: None <port-sparc@NetBSD.org, current-users@NetBSD.org>
From: Matthias Scheler <tron@zhadum.org.uk>
List: current-users
Date: 07/13/2006 11:51:09
	Hello,

I'm trying to cross build NetBSD-sparc current (2006-07-13 sources) on my
NetBSD-i386 3.0_STABLE box. The build fails because the compiler
apparently generates opcodes which the assembler doesn't understand:

#   compile  libstdc++-v3_4/atomicity.o
/home/tron/obj/tooldir.NetBSD-3.0_STABLE-i386/bin/sparc--netbsdelf-c++ -O2 -Werror -fno-implicit-templates -fdiagnostics-show-location=once  -nostdinc++ -cxx-isystem /home/tron/obj/destdir.sparc/usr/include/g++  -I/src/NetBSD-current/src/gnu/dist/gcc4/gcc -I/src/NetBSD-current/src/gnu/dist/gcc4/include -I/src/NetBSD-current/src/gnu/dist/gcc4/libstdc++-v3/libsupc++ -I/src/NetBSD-current/src/gnu/lib/libstdc++-v3_4/../libstdc++-v3_4/arch/sparc -I. -DHAVE_STDLIB_H -DHAVE_STRING_H -I/src/NetBSD-current/src/gnu/dist/gcc4/libstdc++-v3/include   -nostdinc -isystem /home/tron/obj/destdir.sparc/usr/include -c    /src/NetBSD-current/src/gnu/lib/libstdc++-v3_4/atomicity.cc -o atomicity.o
/tmp/ccVi3yPr.s: Assembler messages:
/tmp/ccVi3yPr.s:14: Fatal error: Unknown opcode: `xchg{l} {[%g1+%lo(_ZN9__gnu_cxx15_Atomicity_lockILi0EE17_S_atomicity_lockE)],%g2|%g2,[%g1+%lo(_ZN9__gnu_cxx15_Atomicity_lockILi0EE17_S_atomicity_lockE)]}'

*** Failed target:  atomicity.o

I used the following command to build:

env MAKECONF=/bla ./build.sh -O $HOME/obj -u -U -m sparc tools distribution sets
[A file called "/bla" does *not* exist. I'm therefore effectively using
 the default options.]

	Kind regards

-- 
Matthias Scheler                                  http://scheler.de/~matthias/