Trying to bootstrap the 3.4 branch (or mainline) on Solaris 8/SPARC with GNU as 2.14.91 (or 2.14) fails linking libgcc_s.so.1: ./xgcc -B./ -B/vol/gcc/share/sparc-sun-solaris2.8/bin/ -isystem /vol/gcc/share/sparc-sun-solaris2.8/include -isystem /vol/gcc/share/sparc-sun-solaris2.8/sys-include -L/vol/gcc/obj/gcc-3.4.1-20040503/8-gcc-gas/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs -Wl,-M,libgcc/./libgcc.map -o libgcc_s.so.1 libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatdi! tf.o libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 libgcc_s.so ld: fatal: relocation error: R_SPARC_32: file libgcc/./_muldi3.o: symbol <unknown>: offset 0xfeaf6e39 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_negdi2.o: symbol <unknown>: offset 0xfeaf6ead is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_lshrdi3.o: symbol <unknown>: offset 0xfeaf6f1b is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_ashldi3.o: symbol <unknown>: offset 0xfeaf6fa2 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_ashrdi3.o: symbol <unknown>: offset 0xfeaf7029 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_ucmpdi2.o: symbol <unknown>: offset 0xfeaf7123 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_floatdidf.o: symbol <unknown>: offset 0xfeaf7196 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_floatdisf.o: symbol <unknown>: offset 0xfeaf720f is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixunsdfsi.o: symbol <unknown>: offset 0xfeaf72af is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixunssfsi.o: symbol <unknown>: offset 0xfeaf7326 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixunsdfdi.o: symbol <unknown>: offset 0xfeaf739d is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixdfdi.o: symbol <unknown>: offset 0xfeaf7415 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixunssfdi.o: symbol <unknown>: offset 0xfeaf748d is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixsfdi.o: symbol <unknown>: offset 0xfeaf750e is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixtfdi.o: symbol <unknown>: offset 0xfeaf75ee is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_fixunstfdi.o: symbol <unknown>: offset 0xfeaf7667 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_clear_cache.o: symbol <unknown>: offset 0xfeaf7765 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_trampoline.o: symbol <unknown>: offset 0xfeaf77c5 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_absvsi2.o: symbol <unknown>: offset 0xfeaf784f is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_absvdi2.o: symbol <unknown>: offset 0xfeaf78bf is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_addvdi3.o: symbol <unknown>: offset 0xfeaf79a2 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_subvsi3.o: symbol <unknown>: offset 0xfeaf7a17 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_mulvsi3.o: symbol <unknown>: offset 0xfeaf7b01 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_negvsi2.o: symbol <unknown>: offset 0xfeaf7c2f is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_negvdi2.o: symbol <unknown>: offset 0xfeaf7ca1 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_ffssi2.o: symbol <unknown>: offset 0xfeaf7d3d is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_ffsdi2.o: symbol <unknown>: offset 0xfeaf7dbf is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_clzsi2.o: symbol <unknown>: offset 0xfeaf7ea2 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_clzdi2.o: symbol <unknown>: offset 0xfeaf7f23 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_ctzsi2.o: symbol <unknown>: offset 0xfeaf7fa3 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_popcountsi2.o: symbol <unknown>: offset 0xfeaf80f3 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_popcountdi2.o: symbol <unknown>: offset 0xfeaf8165 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_paritysi2.o: symbol <unknown>: offset 0xfeaf81d7 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_paritydi2.o: symbol <unknown>: offset 0xfeaf8249 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_udivdi3.o: symbol <unknown>: offset 0xfeaf848e is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_umoddi3.o: symbol <unknown>: offset 0xfeaf8562 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_udiv_w_sdiv.o: symbol <unknown>: offset 0xfeaf8627 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./_udivmoddi4.o: symbol <unknown>: offset 0xfeaf86a2 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./unwind-dw2.o: symbol <unknown>: offset 0xfeaf87f5 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./unwind-dw2-fde.o: symbol <unknown>: offset 0xfeaf8ed3 is non-aligned ld: fatal: relocation error: R_SPARC_32: file libgcc/./gthr-gnat.o: symbol <unknown>: offset 0xfeaf9445 is non-aligned collect2: ld returned 1 exit status make[3]: *** [libgcc_s.so] Error 1 As analysed in http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01791.html, this seems to be a gas bug. Environment: System: SunOS padouk 5.8 Generic_108528-23 sun4u sparc SUNW,Sun-Fire-880 Architecture: sun4 host: sparc-sun-solaris2.8 build: sparc-sun-solaris2.8 target: sparc-sun-solaris2.8 configured with: /vol/gnu/src/gcc/gcc-3.4-branch-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls --with-gnu-as --with-as=/vol/gcc/lib/gas-2.14.91 How-To-Repeat: Try bootstrapping on sparc-sun-solaris2.8 with GNU as as described above.
Did you report this to the binutils team, they do have a bugzilla located at: <http://sources.redhat.com/bugzilla>?
Subject: Re: libgcc_s.so.1 fails to link on Solaris 8/SPARC with GNU as 2.14.91 Done: PR binutils/144 http://sources.redhat.com/bugzilla/show_bug.cgi?id=144 Rainer
Thanks for checking, Rainer. Confirmed with GNU as 2.14 and Sun ld. Fortunately this is mitigated by the 'grep' issue [For other readers: the workaround is to make sure that 'grep' is not GNU grep]. Now we have to understand why this doesn't seem to happen on Linux/SPARC.
Subject: Re: libgcc_s.so.1 fails to link on Solaris 8/SPARC with GNU as 2.14.91 > Now we have to understand why this doesn't seem to happen on Linux/SPARC. Maybe this doesn't happen with GNU ld? Rainer
You're right, of course. No problem with GNU as + GNU ld, although we still have the unaligned R_SPARC_32 instead of R_SPARC_UA32: gax% elfdump -r _muldi3.o [...] Relocation: .rela.debug_line type offset addend section with respect to R_SPARC_32 0x59 0 .rela.debug_li .text Given that the bootstrap is successful 1. with Sun as + Sun ld, 2. with GNU as + GNU ld, 3. with GNU as + Sun ld + easy workaround I'm suspending this PR.
Subject: Re: libgcc_s.so.1 fails to link on Solaris 8/SPARC with GNU as 2.14.91 ebotcazou at gcc dot gnu dot org writes: > Given that the bootstrap is successful > > 1. with Sun as + Sun ld, > 2. with GNU as + GNU ld, > 3. with GNU as + Sun ld + easy workaround > > I'm suspending this PR. Ok. I don't care much myself, as I never use/test gas/gld on Solaris. Still looks like a gas bug, but the binutils PR hasn't received any attention yet. Rainer
Removing target milestone since the PR is suspended.
*** Bug 17476 has been marked as a duplicate of this bug. ***
seen this with S10 and gcc-3.4.6 as well. For some reason I didn't see this with gcc-3.4.5 and perhaps earlier versions. Workaround for me is to set LIBGCC2_DEBUG_CFLAGS (in gcc/Makefile.in) to -gstabs instead of -g.
FYI, just found this fixed in binutils 2.18: http://www.cygwin.com/ml/binutils/2006-11/msg00290.html
Right, I completely forgot about this PR...
*** Bug 37092 has been marked as a duplicate of this bug. ***
*** Bug 37050 has been marked as a duplicate of this bug. ***