Subject: Re: 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: port-sparc
Date: 07/16/2006 15:56:56
In article <20060715010140.GL24438@snark.ptc.spbu.ru>,
>> # 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)]}'
>
>
> Looks like an i386 instruction has crept into sparc output.
Yes.
> What is the contents of the .s file?
This is the offending part:
mov %i0, %l0
mov 1, %g2
mov %g3, %g1
.LL2:
xchg{l} {[%g1+%lo(_ZN9__gnu_cxx15_Atomicity_lockILi0EE17_S_atomicity_lockE)],%g2|%g2,[%g1+%lo(_ZN9__gnu_cxx15_Atomicity_lockILi0EE17_S_atomicity_lockE)]}
cmp %g2, 0
bne .LL2
nop
Kind regards
--
Matthias Scheler http://scheler.de/~matthias/