From patchwork Sat Dec 24 17:49:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 62380 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F33A23857C45 for ; Sat, 24 Dec 2022 17:50:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F33A23857C45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671904229; bh=dgsPO9Kz8teu+ydEQICNt8Qq9YwcULmybOKGA0Jco6w=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=djqkAn9YAhnwJqOtcaLNFy1xNNLsQyqZiPWMtwN/TXwZ3+efCBsD+2XyFQy1QnDYf BN3CXNIBnq3dZclfojF2PqFwU7eiY6pnxN+cJYjvObjNx7p+r96ll89Tl/4kSWTa1W 8sJnzT6QsCQmIj4q/1c3PIfjMpJGhZXS4UY4iWTc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 6BD1A3858D1E for ; Sat, 24 Dec 2022 17:50:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6BD1A3858D1E Received: by mail-wr1-x429.google.com with SMTP id o5so7126654wrm.1 for ; Sat, 24 Dec 2022 09:50:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dgsPO9Kz8teu+ydEQICNt8Qq9YwcULmybOKGA0Jco6w=; b=gRnKRN02KiUOcKAzkPlLTQ/yFvmtm1drvsfeCOWMdhhYXUDJcL2jY2cVBiBkw14V22 0PxGUM3G/dzFub7KWkxFfTcl10lQZJNeqVH23WJWUluoHsVbHNTgRrT09Q7V32cfvnOd OyhFry7IWcNAlYC8yYyI7AXcLO+pXPDg9cA0AARJxDJ1GJwOaHvB6tWuTrIfF++PLgnG lK6kodIC+p4EA9QbQeLs0KAOlFTvSfSegx8or/m33q1MHsp9lLWpLg2WDHi/uMEpjMRf KHZ7o++pkqsRSG4TPf/mo1VyyvgPk84viWzrY4dqwR29XZ+Y0WDJQw1iMEYfAP8PiySR ikYQ== X-Gm-Message-State: AFqh2krSi2Lf7l1gWcGpcJdnMxT3IfEwbC0cnlmF1PWnZ3hkhzP30ABC gcwscn9NjhAeuFRSNz3N0lgl861IhcU= X-Google-Smtp-Source: AMrXdXvd1fdo+zGr3POY1L+cTaPC0t+eDEXTe1JtE9McjLMP157Sde2GupAofVEPglmnwAg4CSWzNQ== X-Received: by 2002:adf:f18d:0:b0:242:5d76:f571 with SMTP id h13-20020adff18d000000b002425d76f571mr8531995wro.2.1671904198955; Sat, 24 Dec 2022 09:49:58 -0800 (PST) Received: from localhost.localdomain (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.gmail.com with ESMTPSA id r17-20020adfdc91000000b0027973315213sm1175428wrj.89.2022.12.24.09.49.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 24 Dec 2022 09:49:58 -0800 (PST) X-Google-Original-From: Iain Sandoe 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 Message-Id: <20221224174957.95123-1-iain@sandoe.co.uk> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) MIME-Version: 1.0 X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Sandoe via Gcc-patches From: Iain Sandoe Reply-To: iain@sandoe.co.uk Cc: Iain Sandoe Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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 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