aboutsummaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-12-15 12:49:18 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2001-12-15 12:49:18 +0100
commit275b60d6d894519cc11ee3cd4f8ad0ba6f92b0d3 (patch)
tree1e290b8253af587309d21dfa2217501a304a75ac /gcc/Makefile.in
parent861ef92859ce3681ae24ecac1384e0be2a035c9d (diff)
downloadgcc-275b60d6d894519cc11ee3cd4f8ad0ba6f92b0d3.zip
gcc-275b60d6d894519cc11ee3cd4f8ad0ba6f92b0d3.tar.gz
gcc-275b60d6d894519cc11ee3cd4f8ad0ba6f92b0d3.tar.bz2
configure.in: Check for ld.
* configure.in: Check for ld. (HAVE_LD_EH_FRAME_HDR): Define if ld supports --eh-frame-hdr option. * configure, config.in: Rebuilt. * config.gcc: Add crtbeginT.o to extra_parts where needed. * config/t-linux (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde-glibc frame unwinding on Linux. * config/t-linux-gnulibc1 (LIB2ADDEH, LIB2ADDEHDEP): Use unwind-dw2-fde frame unwinding. * config/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/i386/gnu.h (STARTFILE_SPEC): Use crtbeginT.o for -static. * config/ia64/linux.h (STARTFILE_SPEC, LINK_EH_SPEC): Define. * config/ia64/fde-glibc.c (_Unwind_IteratePhdrCallback): Don't iterate further if pc falls into current library, but fde was not found. * config/sparc/linux.h (STARTFILE_SPEC): Use crtbeginT.o for -static if using glibc. (LINK_EH_SPEC): Define. * config/sparc/linux64.h (STARTFILE_SPEC32, STARTFILE_SPEC64): Use crtbeginT.o for -static. (LINK_EH_SPEC): Define. * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Add crtbeginT.o. * Makefile.in (crtbeginT.o): Add rule. * gcc.c (init_gcc_specs): For -static-libgcc, use -lgcc -lgcc_eh. If neither -static-libgcc nor -shared-libgcc is passed and -shared, use -lgcc if LINK_EH_SPEC is defined and -lgcc_s -lgcc if not. If none of the above switches are passed, use -lgcc -lgcc_eh. (init_spec): If LINK_EH_SPEC is defined, prepend it to link_spec. * mklibgcc.in: Don't include LIB2ADDEH objects into libgcc.a if creating libgcc_s.so, put them into separate libgcc_eh.a instead. * unwind-dw2-fde.c: Don't include any headers if this file is included from other .c file. * unwind-dw2-fde-glibc.c: New file. * crtstuff.c (USE_PT_GNU_EH_FRAME, USE_EH_FRAME_REGISTRY): Define. Use it instead of EH_FRAME_SECTION_NAME where appropriate. From-SVN: r48039
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in35
1 files changed, 30 insertions, 5 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index adb7281..ecba14f 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1106,6 +1106,15 @@ $(T)crtendS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
-c $(srcdir)/crtstuff.c -DCRT_END -DCRTSTUFFS_O \
-o $(T)crtendS$(objext)
+# This is a version of crtbegin for -static links.
+$(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \
+ gbl-ctors.h stmp-int-hdrs tsystem.h
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
+ -finhibit-size-directive -fno-inline-functions \
+ -fno-exceptions $(CRTSTUFF_T_CFLAGS) @inhibit_libc@ \
+ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \
+ -o $(T)crtbeginT$(objext)
+
# Compile the start modules crt0.o and mcrt0.o that are linked with
# every program
crt0.o: s-crt0 ; @true
@@ -2384,7 +2393,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
# that don't exist in the distribution.
INTL_CLEAN = intl.clean
clean: mostlyclean $(INTL_CLEAN) lang.clean
- -rm -f libgcc.a libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1
+ -rm -f libgcc.a libgcc_eh.a libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1
-rm -f config.h tconfig.h hconfig.h tm_p.h
-rm -f cs-*
-rm -rf libgcc
@@ -3140,11 +3149,15 @@ stage1-start:
-if [ -f as$(exeext) ] ; then (cd stage1 && $(LN_S) ../as$(exeext) .) ; else true ; fi
-if [ -f ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
- -rm -f stage1/libgcc.a
+ -rm -f stage1/libgcc.a stage1/libgcc_eh.a
-cp libgcc.a stage1
-if $(RANLIB_TEST_FOR_TARGET) ; then \
$(RANLIB_FOR_TARGET) stage1/libgcc.a; \
else true; fi
+ -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage1; \
+ if $(RANLIB_TEST_FOR_TARGET) ; then \
+ $(RANLIB_FOR_TARGET) stage1/libgcc_eh.a; \
+ else true; fi; fi
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage1/$${f} . ; \
else true; \
@@ -3165,11 +3178,15 @@ stage2-start:
-if [ -f as$(exeext) ] ; then (cd stage2 && $(LN_S) ../as$(exeext) .) ; else true ; fi
-if [ -f ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
- -rm -f stage2/libgcc.a
+ -rm -f stage2/libgcc.a stage2/libgcc_eh.a
-cp libgcc.a stage2
-if $(RANLIB_TEST_FOR_TARGET) ; then \
$(RANLIB_FOR_TARGET) stage2/libgcc.a; \
else true; fi
+ -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage2; \
+ if $(RANLIB_TEST_FOR_TARGET) ; then \
+ $(RANLIB_FOR_TARGET) stage2/libgcc_eh.a; \
+ else true; fi; fi
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage2/$${f} . ; \
else true; \
@@ -3190,11 +3207,15 @@ stage3-start:
-if [ -f as$(exeext) ] ; then (cd stage3 && $(LN_S) ../as$(exeext) .) ; else true ; fi
-if [ -f ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
- -rm -f stage3/libgcc.a
+ -rm -f stage3/libgcc.a stage3/libgcc_eh.a
-cp libgcc.a stage3
-if $(RANLIB_TEST_FOR_TARGET) ; then \
$(RANLIB_FOR_TARGET) stage3/libgcc.a; \
else true; fi
+ -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage3; \
+ if $(RANLIB_TEST_FOR_TARGET) ; then \
+ $(RANLIB_FOR_TARGET) stage3/libgcc_eh.a; \
+ else true; fi; fi
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage3/$${f} . ; \
else true; \
@@ -3215,11 +3236,15 @@ stage4-start:
-if [ -f as$(exeext) ] ; then (cd stage4 && $(LN_S) ../as$(exeext) .) ; else true ; fi
-if [ -f ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../ld$(exeext) .) ; else true ; fi
-if [ -f collect-ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
- -rm -f stage4/libgcc.a
+ -rm -f stage4/libgcc.a stage4/libgcc_eh.a
-cp libgcc.a stage4
-if $(RANLIB_TEST_FOR_TARGET) ; then \
$(RANLIB_FOR_TARGET) stage4/libgcc.a; \
else true; fi
+ -if [ -f libgcc_eh.a ] ; then cp libgcc_eh.a stage4; \
+ if $(RANLIB_TEST_FOR_TARGET) ; then \
+ $(RANLIB_FOR_TARGET) stage4/libgcc_eh.a; \
+ else true; fi; fi
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage4/$${f} . ; \
else true; \