public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iains.gcc@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: [pushed] libgcc, Darwin: No early install for the compatibility libgcc_s.1.dylib.
Date: Sat, 24 Dec 2022 17:49:57 +0000	[thread overview]
Message-ID: <20221224174957.95123-1-iain@sandoe.co.uk> (raw)

Tested on i686, x86_64 Darwin and x86_64-linux-gnu (with a 32b multilib).
pushed to master, thanks
Iain

--- 8< ---

On Darwin, GCC now uses a libgcc_s.1.1 for builtins and forwards the system
unwinder.  We do, however, build a backwards compatibility libgcc_s.1.dylib.
However, this is not needed by GCC and can cause incorrect operation when
DYLD_LIBRARY_PATH is in use.

Since we do not need or use it during the build, the solution is to skip the
installation into the $build/gcc directory.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libgcc/ChangeLog:

	* config/t-slibgcc-darwin (install-darwin-libgcc-stubs): Skip the
	install of libgcc_s.1.dylib when the installation is into the build
	gcc directory.
---
 libgcc/config/t-slibgcc-darwin | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/libgcc/config/t-slibgcc-darwin b/libgcc/config/t-slibgcc-darwin
index a8f69666a82..cb0cbbdb1c5 100644
--- a/libgcc/config/t-slibgcc-darwin
+++ b/libgcc/config/t-slibgcc-darwin
@@ -72,14 +72,15 @@ all: libgcc_ehs$(SHLIB_EXT)
 LGCC_FILES += libgcc_ehs.$(SHLIB_SOVERSION)$(SHLIB_EXT)
 
 endif
-
-# Provide libgcc_s.1 for backwards compatibility.
-LGCC_FILES += libgcc_s.1.dylib
-
 endif
 
 INSTALL_FILES=$(LGCC_FILES)
 
+ifeq ($(BUILD_LIBGCCS1),YES)
+# Provide libgcc_s.1 for backwards compatibility.
+INSTALL_FILES += libgcc_s.1.dylib
+endif
+
 # For the toplevel multilib, build FAT dylibs including all the multilibs.
 ifeq ($(MULTIBUILDTOP),)
 
@@ -158,9 +159,15 @@ endif
 
 install-darwin-libgcc-stubs :
 	$(mkinstalldirs) $(DESTDIR)$(slibdir)
-	for d in $(INSTALL_FILES) ; do \
-	  $(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
-	done
+	if test x$(slibdir) = x; then \
+	  for d in $(LGCC_FILES) ; do \
+	    $(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
+	  done; \
+	else \
+	  for d in $(INSTALL_FILES) ; do \
+	    $(INSTALL_DATA) $$d $(DESTDIR)$(slibdir)/$$d || exit 1 ; \
+	  done; \
+	fi
 
 else
 
-- 
2.37.1 (Apple Git-137.1)


                 reply	other threads:[~2022-12-24 17:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221224174957.95123-1-iain@sandoe.co.uk \
    --to=iains.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).