Re: CFT: [build] Move crtstuff support to toplevel libgcc
On 11/02/2011 01:37 PM, Rainer Orth wrote: 2011-07-15 Rainer Orth r...@cebitec.uni-bielefeld.de gcc: * config.gcc (extra_parts): Remove. (*-*-freebsd*): Remove extra_parts. (*-*-linux*, frv-*-*linux*, *-*-kfreebsd*-gnu, *-*-knetbsd*-gnu, *-*-gnu*, *-*-kopensolaris*-gnu): Likewise. (*-*-netbsd*): Remove t-libc-ok, t-netbsd from tmake_file. Remove extra_parts for *-*-netbsd*1.[7-9]*, *-*-netbsd[2-9]*, *-*-netbsdelf[2-9]*. (*-*-openbsd*): Remove t-libc-ok from tmake_file. (alpha*-*-linux*): Remove extra_parts. ... This appears to break bootstrap on s390x: /home/andreas/regtest/gcc-bisect-build/./gcc/crtbeginS.o: In function `__do_global_dtors_aux': crtstuff.c:(.text+0x28): relocation truncated to fit: R_390_GOT12 against symbol `__cxa_finalize@@GLIBC_2.2' defined in .text section in /lib64/libc.so.6 /home/andreas/regtest/gcc-bisect-build/./gcc/crtbeginS.o: In function `frame_dummy': crtstuff.c:(.text+0x78): relocation truncated to fit: R_390_GOT12 against undefined symbol `_Jv_RegisterClasses' collect2: error: ld returned 1 exit status make[5]: *** [libstdc++.la] Error 1 make[5]: Leaving directory `/home/andreas/regtest/gcc-bisect-build/s390x-ibm-linux-gnu/libstdc++-v3/src' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/andreas/regtest/gcc-bisect-build/s390x-ibm-linux-gnu/libstdc++-v3' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/andreas/regtest/gcc-bisect-build/s390x-ibm-linux-gnu/libstdc++-v3' make[2]: *** [all-stage1-target-libstdc++-v3] Error 2 make[2]: Leaving directory `/home/andreas/regtest/gcc-bisect-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/andreas/regtest/gcc-bisect-build' make: *** [all] Error 2
Re: CFT: [build] Move crtstuff support to toplevel libgcc
Andreas Krebbel kreb...@linux.vnet.ibm.com writes: This appears to break bootstrap on s390x: /home/andreas/regtest/gcc-bisect-build/./gcc/crtbeginS.o: In function `__do_global_dtors_aux': crtstuff.c:(.text+0x28): relocation truncated to fit: R_390_GOT12 against symbol `__cxa_finalize@@GLIBC_2.2' defined in .text section in /lib64/libc.so.6 /home/andreas/regtest/gcc-bisect-build/./gcc/crtbeginS.o: In function `frame_dummy': crtstuff.c:(.text+0x78): relocation truncated to fit: R_390_GOT12 against undefined symbol What's the exact command line? I suppose the file is compiled with -fpic. All *-*-linux* targets use config/t-crtstuff-pic, with PICFLAG from toplevel config/picflag.m4. If the (non-default) -fpic there is wrong for your target, it should be enough to remove the s390*-*-* case (-fPIC is the default) and rebuild the affected configure files (libgcc/configure, libada/configure, and libiberty/configure). Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: CFT: [build] Move crtstuff support to toplevel libgcc
On 11/04/2011 02:17 PM, Andreas Krebbel wrote: This appears to break bootstrap on s390x: /home/andreas/regtest/gcc-bisect-build/./gcc/crtbeginS.o: In function `__do_global_dtors_aux': crtstuff.c:(.text+0x28): relocation truncated to fit: R_390_GOT12 against symbol `__cxa_finalize@@GLIBC_2.2' defined in .text section in /lib64/libc.so.6 /home/andreas/regtest/gcc-bisect-build/./gcc/crtbeginS.o: In function `frame_dummy': crtstuff.c:(.text+0x78): relocation truncated to fit: R_390_GOT12 against undefined symbol `_Jv_RegisterClasses' collect2: error: ld returned 1 exit status make[5]: *** [libstdc++.la] Error 1 make[5]: Leaving directory `/home/andreas/regtest/gcc-bisect-build/s390x-ibm-linux-gnu/libstdc++-v3/src' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/andreas/regtest/gcc-bisect-build/s390x-ibm-linux-gnu/libstdc++-v3' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/andreas/regtest/gcc-bisect-build/s390x-ibm-linux-gnu/libstdc++-v3' make[2]: *** [all-stage1-target-libstdc++-v3] Error 2 make[2]: Leaving directory `/home/andreas/regtest/gcc-bisect-build' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/home/andreas/regtest/gcc-bisect-build' make: *** [all] Error 2 This is caused by changing t-crtstuff-pic from: CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) -fPIC to: CRTSTUFF_T_CFLAGS_S = $(CRTSTUFF_T_CFLAGS) $(PICFLAG) With that change the crtbeginS file is built with -fpic instead of -fPIC and therefore the relocation above fails due to a GOT overflow. -fPIC compared to -fpic causes a small overhead in the generated code so I'm not sure if that should be changed in config/picflag.m4. I think I would prefer to go back to the old t-crtstuff-pic instead. Bye, -Andreas-
Re: CFT: [build] Move crtstuff support to toplevel libgcc
Rainer Orth r...@cebitec.uni-bielefeld.de writes: diff --git a/libgcc/config/ia64/t-ia64 b/libgcc/config/ia64/t-ia64 --- a/libgcc/config/ia64/t-ia64 +++ b/libgcc/config/ia64/t-ia64 @@ -1,17 +1,15 @@ CUSTOM_CRTSTUFF = yes # Assemble startup files. -crtbegin.o: $(gcc_srcdir)/config/ia64/crtbegin.asm +# FIXME: -I$(gcc_objdir) is necessary to find auto-host.h. Really? +crtbegin.o: $(srcdir)/config/ia64/crtbegin.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $ +crtend.o: $(srcdir)/config/ia64/crtend.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $ +crtbeginS.o: $(srcdir)/config/ia64/crtbegin.S + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ -o $@ -DSHARED $ 2011-11-03 Andreas Schwab sch...@redhat.com * config/ia64/t-ia64 (crtbeginS.o): Fix whitespace damage. diff --git a/libgcc/config/ia64/t-ia64 b/libgcc/config/ia64/t-ia64 index 93f38da..d1ec353 100644 --- a/libgcc/config/ia64/t-ia64 +++ b/libgcc/config/ia64/t-ia64 @@ -27,7 +27,8 @@ crtbegin.o: $(srcdir)/config/ia64/crtbegin.S crtend.o: $(srcdir)/config/ia64/crtend.S $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp $ crtbeginS.o: $(srcdir)/config/ia64/crtbegin.S - $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ -o $@ -DSHARED $ + $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ + -o $@ -DSHARED $ crtendS.o: $(srcdir)/config/ia64/crtend.S $(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \ -o $@ -DSHARED $ -- 1.7.6.4 Andreas. -- Andreas Schwab, sch...@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E And now for something completely different.
Re: CFT: [build] Move crtstuff support to toplevel libgcc
On 02/11/11 12:37, Rainer Orth wrote: Rainer Orthr...@cebitec.uni-bielefeld.de writes: The next patch in the series moves crtstuff.c, extra_parts, EXTRA_PARTS, EXTRA_MULTILIB_PARTS and referenced files to libgcc. This will avoid errors due to inconsistencies in extra_parts between gcc and libgcc in the future. Much of this is pretty mechanical, but given that I cannot test most of the platforms, there are likely to be mistakes in the process. Given Joseph's approval, I'm about to check in the following rebased version of the patch, after regtesting on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-unknown-linux-gnu, i386-apple-darwin9.8.0, and powerpc-apple-darwin9.8.0. Rainer This also breaks arm-none-eabi builds (fails to find unwind-arm-common.h from gcc/ginclude). I have raised PR50978 for this (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50978). Thanks, Matt -- Matthew Gretton-Dann Principal Engineer, PD Software - Tools, ARM Ltd
Re: CFT: [build] Move crtstuff support to toplevel libgcc
Jason Merrill ja...@redhat.com writes: This broke bootstrap on powerpc64-unknown-linux-gnu, due to a couple of problems with t-ppccomm. I fixed the missing backslashes, but the startup file recipes are clearly wrong as well: ecrti$(objext): $(srcdir)/config/rs6000/eabi-ci.S $(crt_compile) -c ecrti.S Note that they try to compile a source file which no longer exists. They do, but not by that name. In gcc/config, ecrti.S was generated as a copy of eabi-ci.S, but in libgcc, this isn't necessary any longer. I fixed the dependencies, but forgot to adapt the source files Could you please try the following patch? Sorry for all the breakage. Rainer 2011-11-03 Rainer Orth r...@cebitec.uni-bielefeld.de libgcc: * config/rs6000/t-ppccomm (ecrti$(objext)): Use $. (ecrtn$(objext)): Likewise. (ncrti$(objext)): Likewise. (ncrtn$(objext)): Likewise. diff --git a/libgcc/config/rs6000/t-ppccomm b/libgcc/config/rs6000/t-ppccomm --- a/libgcc/config/rs6000/t-ppccomm +++ b/libgcc/config/rs6000/t-ppccomm @@ -29,13 +29,13 @@ LIB2ADD_ST += \ # Assemble startup files. ecrti$(objext): $(srcdir)/config/rs6000/eabi-ci.S - $(crt_compile) -c ecrti.S + $(crt_compile) -c $ ecrtn$(objext): $(srcdir)/config/rs6000/eabi-cn.S - $(crt_compile) -c ecrtn.S + $(crt_compile) -c $ ncrti$(objext): $(srcdir)/config/rs6000/sol-ci.S - $(crt_compile) -c ncrti.S + $(crt_compile) -c $ ncrtn$(objext): $(srcdir)/config/rs6000/sol-cn.S - $(crt_compile) -c ncrtn.S + $(crt_compile) -c -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: CFT: [build] Move crtstuff support to toplevel libgcc
On 11/03/2011 01:52 PM, Rainer Orth wrote: ncrtn$(objext): $(srcdir)/config/rs6000/sol-cn.S - $(crt_compile) -c ncrtn.S + $(crt_compile) -c Oops. Missing dollar sign. Paolo
Re: CFT: [build] Move crtstuff support to toplevel libgcc
That fixed bootstrap, so I committed it. Jason
Re: CFT: [build] Move crtstuff support to toplevel libgcc
Matthew Gretton-Dann matthew.gretton-d...@arm.com writes: This also breaks arm-none-eabi builds (fails to find unwind-arm-common.h from gcc/ginclude). I have raised PR50978 for this (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50978). I had incidentally removed arm/t-bpabi, incorrectly assuming it was empty while it is still needed to add unwind-arm-common.h to EXTRA_HEADERS. Proposed patch in the PR. Sorry. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: CFT: [build] Move crtstuff support to toplevel libgcc
This broke bootstrap on powerpc64-unknown-linux-gnu, due to a couple of problems with t-ppccomm. I fixed the missing backslashes, but the startup file recipes are clearly wrong as well: ecrti$(objext): $(srcdir)/config/rs6000/eabi-ci.S $(crt_compile) -c ecrti.S Note that they try to compile a source file which no longer exists. Jason
Re: CFT: [build] Move crtstuff support to toplevel libgcc
Hans-Peter Nilsson hans-peter.nils...@axis.com writes: From: Rainer Orth r...@cebitec.uni-bielefeld.de Date: Mon, 15 Aug 2011 19:01:39 +0200 * Unlike any other target, cris has crisv32-*-none and cris-*-none targets which seem to be aliases for their *-elf counterparts. Do we really need to keep those? While I can inherit e.g. extra_parts from *-*-elf, there's no such thing for *-*-none. Feel absolutely free to remove them. Otherwise fine at a glance. Ok, will do, perhaps as a followup when I make a final cleanup round over libgcc/config.host and gcc/config.gcc. BTW, folding crti and crtn into the crtstuff rules had too many exceptions? Historically separated from the crtstuff (CRTIN) rules, but it seems many targets compiled them the same way. I'd guess the patch would have been a bit shorter. Even more boring work! :) This is exactly what I've done, see libgcc/Makefile.in (crt[in]$(objext)), protected by CUSTOM_CRTIN to deal with the three remaining cases that need special treatment. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: CFT: [build] Move crtstuff support to toplevel libgcc
From: Rainer Orth r...@cebitec.uni-bielefeld.de Date: Mon, 15 Aug 2011 19:01:39 +0200 * Unlike any other target, cris has crisv32-*-none and cris-*-none targets which seem to be aliases for their *-elf counterparts. Do we really need to keep those? While I can inherit e.g. extra_parts from *-*-elf, there's no such thing for *-*-none. Feel absolutely free to remove them. Otherwise fine at a glance. Thanks for doing this boring work. BTW, folding crti and crtn into the crtstuff rules had too many exceptions? Historically separated from the crtstuff (CRTIN) rules, but it seems many targets compiled them the same way. I'd guess the patch would have been a bit shorter. Even more boring work! :) brgds, H-P