compiling gcc4.2.1 failure

Kai Ruottu karuottu@mbnet.fi
Mon Aug 13 10:40:00 GMT 2007


jiaqi zhang wrote:
> I'm compiling gcc-4.2.1 on a sparc64 system. The make fails and complains:
> /usr/local/gcc/objdir/./gcc/xgcc -B/usr/local/gcc/objdir/./gcc/
> -B/usr/local/gcc/gcc-install/sparc-linux-gnu/bin/
> -B/usr/local/gcc/gcc-install/sparc-linux-gnu/lib/ -isystem
> /usr/local/gcc/gcc-install/sparc-linux-gnu/include -isystem
> /usr/local/gcc/gcc-install/sparc-linux-gnu/sys-include
> -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings
>   
Hmmm... The 'CROSS_COMPILE' means producing a crosscompiler, here one 
for 'sparc-linux-gnu'
$target on a 'sparc64-linux-gnu' or something $host....  Because of this 
you should have the target
binutils installed in the '$tooldir/bin', here 
'/usr/local/gcc/gcc-install/sparc-linux-gnu/bin' just as that
given '-B' option tells !  With bare 'as', 'ld' etc. names...
> The OS is Ubuntu, kernel 2.6.20-12-sparc64-smp.
> The original gcc is Ubuntu 4.1.2-0ubuntu4
> What could be the problem?
>   
 Maybe the 64-bit defaulted 'as' in '/usr/bin' doesn't grok this 
option?  It will be tried next if the target 'as'
is not found in '$tooldir/bin'...

 Probably you didn't want a crosscompiler but a native compiler for the 
native 'sparc64-linux-gnu' target?



More information about the Gcc-help mailing list