[pushed] libgcc, Darwin: Add missing build dependencies.
Commit Message
There was a race condition where the link for the new shared EH library
(only used on earlier Darwin) could fail because the new crts had not been
copied to the gcc directory. This can cause a build failure (although
currently only seen on powerpc-darwin).
Fixed by adding specific dependency on the crts and on the multi target.
We also add the declaration header for the Darwin10 unwinder shim to the
powerpc cases, since we build that there for Rosetta use.
tested on i686, x86_64 and on several cycles of powerpc-darwin, pushed
to master, thanks,
Iain
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
libgcc/ChangeLog:
* config.host: Add shim declaration header to powerpc*-darwin builds.
* config/rs6000/t-darwin-ehs: Remove dependency on the powerpc end
file.
* config/t-darwin-ehs: Add dependencies to the shared unwinder
objects.
* config/t-slibgcc-darwin: Add extra_parts to the dependencies for
the shared EH lib. Add all-multi to the dependencies for the
libgcc_s.1.dylib redirections.
---
libgcc/config.host | 4 ++++
libgcc/config/rs6000/t-darwin-ehs | 4 +---
libgcc/config/t-darwin-ehs | 3 +++
libgcc/config/t-slibgcc-darwin | 8 ++++----
4 files changed, 12 insertions(+), 7 deletions(-)
@@ -1140,10 +1140,14 @@ powerpc-*-darwin*)
md_unwind_header=rs6000/darwin-unwind.h
;;
esac
+ # We build the darwin10 EH shim for Rosetta (running on x86 machines).
+ tm_file="$tm_file i386/darwin-lib.h"
tmake_file="$tmake_file rs6000/t-ppc64-fp rs6000/t-ibm-ldouble"
extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
;;
powerpc64-*-darwin*)
+ # We build the darwin10 EH shim for Rosetta (running on x86 machines).
+ tm_file="$tm_file i386/darwin-lib.h"
tmake_file="$tmake_file rs6000/t-darwin64 rs6000/t-ibm-ldouble"
extra_parts="$extra_parts crt2.o crt3_2.o libef_ppc.a dw_ppc.o"
;;
@@ -1,5 +1,3 @@
# We need the save_world code for the EH library.
-LIBEHSOBJS += darwin-world_s.o
-
-$(LIBEHSOBJS): libef_ppc.a
+LIBEHSOBJS += darwin-world_s.o
@@ -2,3 +2,6 @@
# libgcc_s.1 on systems that used the unwinder in libgcc_s.
LIBEHSOBJS = unwind-dw2_s.o unwind-dw2-fde-darwin_s.o unwind-c_s.o
+
+unwind-dw2_s.o: gthr-default.h md-unwind-support.h
+$(LIBEHSOBJS): libgcc_tm.h
@@ -59,9 +59,8 @@ ifneq ($(LIBEHSOBJS),)
EHS_INSTNAME = libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)
# multilib build for a shared EH lib.
-$(LIBEHSOBJS): libgcc_tm.h
-libgcc_ehs$(SHLIB_EXT): $(LIBEHSOBJS)
+libgcc_ehs$(SHLIB_EXT): $(LIBEHSOBJS) $(extra-parts)
mkdir -p $(MULTIDIR)
$(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \
-install_name $(SHLIB_INSTALL_DIR)/$(EHS_INSTNAME) \
@@ -113,7 +112,8 @@ libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT): all-multi libgcc_ehs$(SHLIB_EXT)
rm libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)_T*
-libgcc_s.1.dylib: libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) \
+ libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)
MLIBS=`$(CC) --print-multi-lib | sed -e 's/;.*$$//'` ; \
for mlib in $$MLIBS ; do \
cp ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) \
@@ -134,7 +134,7 @@ libgcc_s.1.dylib: libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT) libgcc_ehs.$(SHLIB_SOV
else
-libgcc_s.1.dylib: libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
+libgcc_s.1.dylib: all-multi libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
MLIBS=`$(CC) --print-multi-lib | sed -e 's/;.*$$//'` ; \
for mlib in $$MLIBS ; do \
cp ../$${mlib}/libgcc/$${mlib}/libgcc_s$(SHLIB_EXT) \