From e141542e74a015a27828aeaf89dabfbac9506ccc Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Wed, 13 Jul 2011 16:28:30 +0000 Subject: [PATCH] darwin-crt2.c: Move to ../libgcc/config/rs6000. gcc: * config/darwin-crt2.c: Move to ../libgcc/config/rs6000. * config/darwin-crt3.c: Move to ../libgcc/config. * config/t-darwin (EXTRA_MULTILIB_PARTS): Remove. ($(T)crt3$(objext)): Remove. * config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): Remove. ($(T)crt2$(objext)): Remove. * config.gcc (powerpc-*-darwin*): Remove extra_parts. (powerpc64-*-darwin*): Likewise. gcc/po: * EXCLUDES (config/darwin-crt2.c): Remove. libgcc: * config/darwin-crt3.o: New file. * config/rs6000/darwin-crt2.c: New file. * config/t-darwin: New file. * config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): New variable. (crt2.o): New rule. * config.host (*-*-darwin*): Add crt3.o to extra_parts. (powerpc-*-darwin*): Add crt2.o to extra_parts. (powerpc64-*-darwin*): Likewise. From-SVN: r176239 --- gcc/ChangeLog | 11 +++++++++++ gcc/config.gcc | 2 -- gcc/config/rs6000/t-darwin | 9 --------- gcc/config/t-darwin | 9 --------- gcc/po/ChangeLog | 4 ++++ gcc/po/EXCLUDES | 1 - libgcc/ChangeLog | 11 +++++++++++ libgcc/config.host | 3 +++ {gcc => libgcc}/config/darwin-crt3.c | 0 {gcc/config => libgcc/config/rs6000}/darwin-crt2.c | 0 libgcc/config/rs6000/t-darwin | 5 +++++ libgcc/config/t-darwin | 4 ++++ 12 files changed, 38 insertions(+), 21 deletions(-) rename {gcc => libgcc}/config/darwin-crt3.c (100%) rename {gcc/config => libgcc/config/rs6000}/darwin-crt2.c (100%) create mode 100644 libgcc/config/t-darwin diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed493138eeb..522258417ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2011-07-13 Rainer Orth + + * config/darwin-crt2.c: Move to ../libgcc/config/rs6000. + * config/darwin-crt3.c: Move to ../libgcc/config. + * config/t-darwin (EXTRA_MULTILIB_PARTS): Remove. + ($(T)crt3$(objext)): Remove. + * config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): Remove. + ($(T)crt2$(objext)): Remove. + * config.gcc (powerpc-*-darwin*): Remove extra_parts. + (powerpc64-*-darwin*): Likewise. + 2011-07-13 H.J. Lu * config/i386/i386.c (x86_output_mi_thunk): Support ptr_mode diff --git a/gcc/config.gcc b/gcc/config.gcc index c9dab55c63d..decd6ab8be8 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2030,7 +2030,6 @@ picochip-*) # ;; powerpc-*-darwin*) extra_options="${extra_options} rs6000/darwin.opt" - extra_parts="crt2.o" case ${target} in *-darwin1[0-9]* | *-darwin[8-9]*) tmake_file="${tmake_file} rs6000/t-darwin8" @@ -2047,7 +2046,6 @@ powerpc-*-darwin*) ;; powerpc64-*-darwin*) extra_options="${extra_options} ${cpu_type}/darwin.opt" - extra_parts="crt2.o" tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-dummy" tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h" extra_headers=altivec.h diff --git a/gcc/config/rs6000/t-darwin b/gcc/config/rs6000/t-darwin index 11cdcb3dc7c..8113b9ecbcb 100644 --- a/gcc/config/rs6000/t-darwin +++ b/gcc/config/rs6000/t-darwin @@ -27,8 +27,6 @@ LIB2FUNCS_STATIC_EXTRA = \ $(srcdir)/config/rs6000/darwin-fpsave.asm \ $(srcdir)/config/rs6000/darwin-vecsave.asm -DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall -mmacosx-version-min=10.4 - # The .asm files above are designed to run on all processors, # even though they use AltiVec instructions. -Wa is used because # -force_cpusubtype_ALL doesn't work with -dynamiclib. @@ -46,10 +44,3 @@ LIB2ADDEH += $(srcdir)/config/rs6000/darwin-fallback.c darwin-fpsave.o: $(srcdir)/config/rs6000/darwin-asm.h darwin-tramp.o: $(srcdir)/config/rs6000/darwin-asm.h - -# Explain how to build crt2.o -$(T)crt2$(objext): $(srcdir)/config/darwin-crt2.c $(GCC_PASSES) \ - $(TCONFIG_H) stmp-int-hdrs tsystem.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \ - $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) \ - -c $(srcdir)/config/darwin-crt2.c -o $(T)crt2$(objext) diff --git a/gcc/config/t-darwin b/gcc/config/t-darwin index 2703e85f35a..9e77395998d 100644 --- a/gcc/config/t-darwin +++ b/gcc/config/t-darwin @@ -42,15 +42,6 @@ darwin-driver.o: $(srcdir)/config/darwin-driver.c \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/darwin-driver.c -# How to build crt3.o -EXTRA_MULTILIB_PARTS=crt3.o -# Pass -fno-tree-dominator-opts to work around bug 26840. -$(T)crt3$(objext): $(srcdir)/config/darwin-crt3.c $(GCC_PASSES) \ - $(TCONFIG_H) stmp-int-hdrs tsystem.h - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \ - -fno-tree-dominator-opts $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) \ - -c $(srcdir)/config/darwin-crt3.c -o $(T)crt3$(objext) - # Use unwind-dw2-fde-darwin LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-darwin.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index e679b38c900..ff45aa8d857 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2011-07-13 Rainer Orth + + * EXCLUDES (config/darwin-crt2.c): Remove. + 2011-07-11 Rainer Orth * EXCLUDES (libgcov.c): Remove. diff --git a/gcc/po/EXCLUDES b/gcc/po/EXCLUDES index a43aea5a445..cc29a2bd1ac 100644 --- a/gcc/po/EXCLUDES +++ b/gcc/po/EXCLUDES @@ -22,7 +22,6 @@ # .def are examined to begin with. # These files are part of libgcc, or target headers provided by gcc. -config/darwin-crt2.c config/fp-bit.c config/fp-bit.h config/vxlib.c diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index c358ae4126a..bfbf1053157 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,14 @@ +2011-07-13 Rainer Orth + + * config/darwin-crt3.o: New file. + * config/rs6000/darwin-crt2.c: New file. + * config/t-darwin: New file. + * config/rs6000/t-darwin (DARWIN_EXTRA_CRT_BUILD_CFLAGS): New variable. + (crt2.o): New rule. + * config.host (*-*-darwin*): Add crt3.o to extra_parts. + (powerpc-*-darwin*): Add crt2.o to extra_parts. + (powerpc64-*-darwin*): Likewise. + 2011-07-13 Rainer Orth * config/i386/netware-crt0.c: New file. diff --git a/libgcc/config.host b/libgcc/config.host index 6b6caffde95..56ce998a62b 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -153,6 +153,7 @@ case ${host} in *-*-darwin*) asm_hidden_op=.private_extern tmake_file="t-darwin ${cpu_type}/t-darwin t-slibgcc-darwin" + extra_parts=crt3.o ;; *-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) # This is the place-holder for the generic a.out configuration @@ -528,8 +529,10 @@ powerpc-*-darwin*) md_unwind_header=rs6000/darwin-unwind.h ;; esac + extra_parts="$extra_parts crt2.o" ;; powerpc64-*-darwin*) + extra_parts="$extra_parts crt2.o" ;; powerpc-*-freebsd*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-freebsd t-softfp" diff --git a/gcc/config/darwin-crt3.c b/libgcc/config/darwin-crt3.c similarity index 100% rename from gcc/config/darwin-crt3.c rename to libgcc/config/darwin-crt3.c diff --git a/gcc/config/darwin-crt2.c b/libgcc/config/rs6000/darwin-crt2.c similarity index 100% rename from gcc/config/darwin-crt2.c rename to libgcc/config/rs6000/darwin-crt2.c diff --git a/libgcc/config/rs6000/t-darwin b/libgcc/config/rs6000/t-darwin index 0afe837b458..4541e4ed3ed 100644 --- a/libgcc/config/rs6000/t-darwin +++ b/libgcc/config/rs6000/t-darwin @@ -1 +1,6 @@ +DARWIN_EXTRA_CRT_BUILD_CFLAGS = -mlongcall -mmacosx-version-min=10.4 + +crt2.o: $(srcdir)/config/rs6000/darwin-crt2.c + $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $< + SHLIB_VERPFX = $(gcc_srcdir)/config/rs6000/darwin-libgcc diff --git a/libgcc/config/t-darwin b/libgcc/config/t-darwin new file mode 100644 index 00000000000..548f0e3d469 --- /dev/null +++ b/libgcc/config/t-darwin @@ -0,0 +1,4 @@ +# Pass -fno-tree-dominator-opts to work around bug 26840. +crt3.o: $(srcdir)/config/darwin-crt3.c + $(crt_compile) \ + -fno-tree-dominator-opts $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -c $< -- 2.30.2