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: 36438 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp245122wrt; Sat, 24 Dec 2022 09:50:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXu6mSGNCnY3UGMj0IYlQBWsRmnkTHVQ4ag6xXcxJGAZ9CZ0Z3IsbgdQqnzHSGadaYiIMbX1 X-Received: by 2002:a17:907:d410:b0:7a7:9a38:d284 with SMTP id vi16-20020a170907d41000b007a79a38d284mr3493430ejc.19.1671904245581; Sat, 24 Dec 2022 09:50:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671904245; cv=none; d=google.com; s=arc-20160816; b=GRovW9Vtm/PzrF875e1bMgxibkscH0llp2d5D+nbEuzmGUR4GlDT+dPZkNrj6+4MDd jmTBUqWCiEUICpgwshe0t2KBvgbujzYKfW+WipYQJNueEzojdnk4SUOkJ5VTh+zgk5qF RsXVC+M7yFQQEgzp98IwwL9HeLum9xgQgTqEpOGv2guaxSdoyawnADLXHTdt0GFLgUNK BR4ORdqH81OcDy0chT//tZBJvPuGQdtTiKD8bA2WxU+LiIfvEAMgYLzp5PXpTJhr1kkL bVUNBY35T6VTy5DctrC+9OMJtx76G7nXWmXg+9zujS/VAXvIvxTg6TPMxlGblRX+Sxhx smiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=dgsPO9Kz8teu+ydEQICNt8Qq9YwcULmybOKGA0Jco6w=; b=A2T8pLhDWORq69dZ2lwPZtmKSlI33Fcyjg8uNOZZnCeCWKLjKnn5zof54Yed+6V+OV LMCmDoeU0wX6EOoG8l8O6UcT+ZrUqVQAPiVRsS8WE/vwUXsVk3HAVQkmVRkyhCRyzWt4 FExnNO6IYmlXcWrdjSlZsLHdJCtyV+uJ52LM3KpipNyycXUsyKYjQYJsaT2WSbEboOmX Hw2DjLvDBBtVAVqKR0UWFa057jaUH3cgVGOGdC7Ou95vMiO1WxUAoTA+pU8GM7Wcf5UI 5MCtQJfqPJ5xB2aIU/yO/dCIuazWNkGjhuPaPLNvaNPxOxQgJ064lr31kK6Pw5I5e+Ub ESDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=nCVCWxix; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id nd15-20020a170907628f00b007da4fe085bbsi5335453ejc.144.2022.12.24.09.50.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Dec 2022 09:50:45 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=nCVCWxix; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B31D1385B53C for ; Sat, 24 Dec 2022 17:50:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B31D1385B53C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671904243; 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=nCVCWxixKuIkAZJRHy7E0VPP+nqmgGaG23bc2SOYVuEbXVV+fLcsoW6xvPgFLPN1A GFYPuArjAllsAKzloXUsy7ArmYS7emfaVJr1g3f6yQVvW3x+ZwhMRsUcmGiVgYeVAx j/fyKqbc3hXrTL5ujInJOAlCMTJ41EL0O/npCGEQ= 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-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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753118666286852322?= X-GMAIL-MSGID: =?utf-8?q?1753118666286852322?= 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