Building a Linux->AIX crosscompiler -- problem with libgcc_s.a

Kai Ruottu karuottu@mbnet.fi
Tue Oct 16 18:15:00 GMT 2007


Kai Ruottu wrote:
> <snip>
> ./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o -lc
> `case . in *pthread*) echo -L/usr/lib/threads -lpthreads -lc_r 
> /usr/lib/libc.a ;;
> *) echo -lc ;; esac` ; rm -f ./tmp-libgcc_s.a ;
> /usr/local/rs6000-ibm-aix5.3/bin/ar -X32_64 -X32_64 rc 
> ./tmp-libgcc_s.a ./shr.o ;
> mv ./tmp-libgcc_s.a ./libgcc_s.a ; rm -f ./shr.o
> /usr/local/rs6000-ibm-aix5.3/bin/nm: /usr/lib/libc.a: File format not 
> recognized
> ----------------- clip 
> ---------------------------------------------------------------
>
> As can be seen the '/usr/lib/libc.a' is tried to be linked in order to 
> create the 'shr.o' and then
> the 'tmp-libgcc_s.a' from it with 'ar' and finally rename this to 
> 'libgcc_s.a'...
This can be a bug or then the 'sysroot'ed  "$sysroot/usr/lib/libc.a"  
would be used  by  the 'nm'.
I didn't use the '--with-sysroot=$sysroot' to point to the (unexisting) 
AIX5.3 C library...  In a
"traditional" crosscompiler build this would be a serious bug in the 
gcc-4.2.2 sources, the
'$tooldir/lib/libc.a' should appear here!



More information about the Gcc-help mailing list