rebuilding gcc 4.8 on solaris 9

Riccardo Mottola rmottola at opencsw.org
Mon Aug 24 23:18:58 CEST 2020


Hi,


On 21/06/2020 18:26, Dagobert Michelsen wrote:
> This is probably due to sparcv8plus vs. sparcv8 but this is only guesswork from me.
> Getting gcc to compile is actually pretty hard.


I tried to build current gcc 4.x, from our repo, on solaris 9. it is 
4.9.3, I of course did --enable-obsolete

. It is set to build sparc v8+ I understand.

Build fails with:

libtool: link: 
/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc/xgcc 
-shared-libgcc 
-B/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc 
-nostdinc++ 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/sparc-sun-solaris2.9/libstdc++-v3/src 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/sparc-sun-solaris2.9/libstdc++-v3/src/.libs 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/sparc-sun-solaris2.9/libstdc++-v3/libsupc++/.libs 
-B/opt/csw/sparc-sun-solaris2.9/bin/ 
-B/opt/csw/sparc-sun-solaris2.9/lib/ -isystem 
/opt/csw/sparc-sun-solaris2.9/include -isystem 
/opt/csw/sparc-sun-solaris2.9/sys-include    -shared -nostdlib 
/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc/crti.o 
/usr/ccs/lib/values-Xa.o 
/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc/crtbegin.o 
.libs/compatibility.o .libs/compatibility-debug_list.o 
.libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o 
.libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o 
.libs/compatibility-chrono.o .libs/compatibility-condvar.o  -Wl,-z 
-Wl,allextract ../libsupc++/.libs/libsupc++convenience.a 
../src/c++98/.libs/libc++98convenience.a 
../src/c++11/.libs/libc++11convenience.a -Wl,-z -Wl,defaultextract 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/sparc-sun-solaris2.9/libstdc++-v3/libsupc++/.libs 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/sparc-sun-solaris2.9/libstdc++-v3/src 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/sparc-sun-solaris2.9/libstdc++-v3/src/.libs 
-lm -lrt 
-L/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc 
-L/opt/csw/sparc-sun-solaris2.9/bin -L/opt/csw/sparc-sun-solaris2.9/lib 
-L/usr/ccs/lib -lgcc_s -lc -lgcc_s -lc 
/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc/crtend.o 
/home/rmottola/opencsw/gcc4/trunk/work/solaris9-sparc/build-isa-sparcv8plus/objdir/./gcc/crtn.o 
-Wl,-M -Wl,libstdc++-symbols.ver-sun   -Wl,-h -Wl,libstdc++.so.6 -o 
.libs/libstdc++.so.6.0.20
ld: fatal: relocation error: R_SPARC_32: file .libs/compatibility.o: 
symbol __gxx_personality_v0: offset 0xf9677 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
.libs/compatibility-chrono.o: symbol __gxx_personality_v0: offset 
0xf98f7 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(atexit_thread.o): symbol 
__gxx_personality_v0: offset 0xf99b3 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(eh_alloc.o): symbol 
__gxx_personality_v0: offset 0xf9f1b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(eh_globals.o): symbol 
__gxx_personality_v0: offset 0xfa247 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(eh_personality.o): symbol 
__gxx_personality_v0: offset 0xfa39b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(eh_ptr.o): symbol 
__gxx_personality_v0: offset 0xfa4a7 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(eh_terminate.o): symbol 
__gxx_personality_v0: offset 0xfa5e3 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file 
../libsupc++/.libs/libsupc++convenience.a(eh_tm.o): symbol 
__gxx_personality_v0: offset 0xfa



and many more, all with relocation non-alignment issues.


Riccardo



More information about the maintainers mailing list