public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6037] libgcc, Darwin: Add missing build dependencies.
@ 2021-12-17 10:13 Iain D Sandoe
  0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2021-12-17 10:13 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:574c09da48a5a0ff4c32dd4577eaf65bac8c94a0

commit r12-6037-g574c09da48a5a0ff4c32dd4577eaf65bac8c94a0
Author: Iain Sandoe <iain@sandoe.co.uk>
Date:   Wed Dec 15 14:11:58 2021 +0000

    libgcc, Darwin: Add missing build dependencies.
    
    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.
    
    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.

Diff:
---
 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(-)

diff --git a/libgcc/config.host b/libgcc/config.host
index 1bac57c82ae..ad0cdb284c7 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -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"
 	;;
diff --git a/libgcc/config/rs6000/t-darwin-ehs b/libgcc/config/rs6000/t-darwin-ehs
index 3047f53cb70..42f521411af 100644
--- a/libgcc/config/rs6000/t-darwin-ehs
+++ b/libgcc/config/rs6000/t-darwin-ehs
@@ -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
diff --git a/libgcc/config/t-darwin-ehs b/libgcc/config/t-darwin-ehs
index 8481898d98a..95275023dac 100644
--- a/libgcc/config/t-darwin-ehs
+++ b/libgcc/config/t-darwin-ehs
@@ -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
diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin
index 7349b87468a..a8f69666a82 100644
--- a/libgcc/config/t-slibgcc-darwin
+++ b/libgcc/config/t-slibgcc-darwin
@@ -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)  \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-17 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 10:13 [gcc r12-6037] libgcc, Darwin: Add missing build dependencies Iain D Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).