From patchwork Sun Dec 7 05:04:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ericson X-Patchwork-Id: 126088 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1CC8452C4D8 for ; Sun, 7 Dec 2025 05:06:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1CC8452C4D8 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=johnericson.me header.i=@johnericson.me header.a=rsa-sha256 header.s=fm3 header.b=UumtWGlv; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=lMqqeZDV X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from fout-b4-smtp.messagingengine.com (fout-b4-smtp.messagingengine.com [202.12.124.147]) by sourceware.org (Postfix) with ESMTPS id D2FCF48F113B for ; Sun, 7 Dec 2025 05:05:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2FCF48F113B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=JohnEricson.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=JohnEricson.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2FCF48F113B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=202.12.124.147 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765083905; cv=none; b=GZabT5zdoslVbB1mueNk7SjgEoPRCigbgm6w8NvEgHD4I6VeiFSdwufaPExfalh/YYdVAgevvhz6kLrJiI2VSUhGiCrWZEykicbK5qVDDQLNldWhlwCZVb5/qM1qzqsfPUVAYNd6s+V67JB6Dp2Bzd5f7hLmF9CcRTKv4fkmxoo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1765083905; c=relaxed/simple; bh=b1PRf4gpF/+14dHtsSg5KUlSAwd/BAVAHWx7B+Jsc/k=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=sPJQzMNPEGE/pciHSqKI85QjwFagPOJABcg6Vb1lFEywpyZrj4uC3uYpH62OSgETZCTpMklRmBxahzUvlfV1/24jpPfBlg2bn4HTz6O+v40Lxu4T/CZTIUBg3vzIa24G5U5C+1ymQ8CWx73rNydNijalKkm5wunIqoGv3gldEqc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2FCF48F113B Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 512DA1D0021A; Sun, 7 Dec 2025 00:05:04 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Sun, 07 Dec 2025 00:05:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnericson.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1765083904; x= 1765170304; bh=b1+aQzJAtJMXkgkW9/Lc00ccvJzxo40mX8ae/aNExfs=; b=U umtWGlvJD+uji6qwMq7WVKJZYogf8tO+lT8PdTLT9NB/d0VupOFDab9JkQSTcfOy ea2UIm1om1ePoedb1wDftwBPJSJj5G9/2dtP7YoH86nWdtNA1wPcuIPMfdzpnc2Z HdBBK2tAspm3jzFNAmI1wMfNTzqP8N6WlSS7RqwShWXNDEV5Iob4SAE2f5KkVGTo pw+qHX/IzKq1Jq5DbxG3OZ6Q0Wtwkfh+7oGw30eD1AhIKF/nS712G4Jd3+mgiGli SIxPtfFQ6+5gdivEg+oY2KOoupyD0SiRK8tOmaCAN8aMivDQUs2983LnAsCGo0b+ n/64SsBQdHcRv6pfthCYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1765083904; x=1765170304; bh=b 1+aQzJAtJMXkgkW9/Lc00ccvJzxo40mX8ae/aNExfs=; b=lMqqeZDVV4zh2lfHf mjIV6qBciNzp1j4uqsfV8RtG/3B7ZV9RgloP3ky2q2C9EwhLmWCLPX6vbO4gW5hK TsPH9iqmMXS/NLcWMnpNjxZda4gEJUymVsMLW2b0fLFiPfAfTabwbD7aFpl2c6oc zkOSGS/S+vv/+W5d+pXap0Zw6URfQnBSpxVybr2wNoR4HdAqrcJTADPWeMcUfDLt TvwNv4KjwiCZGuvXnZ0/SCA2/CQBPawfx8SZrh+xFkZKfsjo68ahj0O0N8ZitkEY gN8/q9LnRsIR82v/KRfG07jXej5zjWlU/Q9YFzgzbuSBT5N8vqJuaVcmwBt2irta z58mQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduvdelfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflohhhnhcugfhr ihgtshhonhcuoehgihhtseflohhhnhfgrhhitghsohhnrdhmvgeqnecuggftrfgrthhtvg hrnhepffdtgedujeettedtledtfefgveeggffggeevgfekleetiefgheeihfegvdfhtdej necuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghhitheslfhohhhngfhrihgtshhonhdrmhgvpdhnsggp rhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgtggtqdhprg httghhvghssehgtggtrdhgnhhurdhorhhgpdhrtghpthhtohepphhinhhskhhirgesghhm rghilhdrtghomhdprhgtphhtthhopehjohhsmhihvghrshesrhgvughhrghtrdgtohhmpd hrtghpthhtohepqhhuihgtpggrphhinhhskhhisehquhhitghinhgtrdgtohhmpdhrtghp thhtohepghhithesjhhohhhnvghrihgtshhonhdrmhgv X-ME-Proxy: Feedback-ID: idab146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Dec 2025 00:05:03 -0500 (EST) From: John Ericson To: gcc-patches@gcc.gnu.org Cc: Andrew Pinski , Joseph Myers , Andrew Pinski , John Ericson Subject: [PATCH v4 RESEND 2/2] libgcc: Dont use TARGET_SYSTEM_ROOT from gcc Date: Sun, 7 Dec 2025 00:04:35 -0500 Message-ID: <20251207050435.339616-2-git@JohnEricson.me> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20251207050435.339616-1-git@JohnEricson.me> References: <2c7a0d9e-e2e9-4bb7-a89f-cf002dc9cb4f@app.fastmail.com> <20251207050435.339616-1-git@JohnEricson.me> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_INFOUSMEBIZ, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_PASS, TXREP, URIBL_CSS_A autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org Following Andrew Pinski's suggestions in https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689683.html, just use the output of: $(CC) -print-sysroot It is just used in one spot, in an AIX code-path. I just made (within make) a shell variable to use instead. I don't have AIX on-hand to test this, however. gcc/ChangeLog: * Makefile.in: No longer include TARGET_SYSTEM_ROOT in libgcc.mvars. libgcc/ChangeLog: * config/rs6000/t-slibgcc-aix: Instead of using a TARGET_SYSTEM_ROOT make variable, just define a shell variable as part of the rule and use that. Suggested-by: Andrew Pinski Signed-off-by: John Ericson --- gcc/Makefile.in | 1 - libgcc/config/rs6000/t-slibgcc-aix | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index a9264bde9bc..d62314505c9 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2503,7 +2503,6 @@ libgcc.mvars: config.status Makefile specs xgcc$(exeext) : > tmp-libgcc.mvars echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars mv tmp-libgcc.mvars libgcc.mvars diff --git a/libgcc/config/rs6000/t-slibgcc-aix b/libgcc/config/rs6000/t-slibgcc-aix index 63336876e2a..4a3d624cfec 100644 --- a/libgcc/config/rs6000/t-slibgcc-aix +++ b/libgcc/config/rs6000/t-slibgcc-aix @@ -40,7 +40,9 @@ SHLIB_LINK = \ -Wl,-bE:@shlib_map_file@ -o shr.o \ @multilib_flags@ @shlib_objs@ -lc \ `case @multilib_dir@ in \ - *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \ + *pthread*) \ + TARGET_SYSTEM_ROOT=\`$(CC) -print-sysroot\`; \ + echo -L$$TARGET_SYSTEM_ROOT/usr/lib/threads -lpthreads -lc_r $$TARGET_SYSTEM_ROOT/usr/lib/libc.a ;; \ *) echo -lc ;; esac` ; \ rm -f tmp-@shlib_base_name@.a ; \ $(AR_CREATE_FOR_TARGET) tmp-@shlib_base_name@.a shr.o ; \ @@ -53,7 +55,9 @@ SHLIB_LINK = \ -Wl,-bE:@shlib_map_file@ -o $$shr.o \ @multilib_flags@ @shlib_objs@ -lc \ `case @multilib_dir@ in \ - *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \ + *pthread*) \ + TARGET_SYSTEM_ROOT=\`$(CC) -print-sysroot\`; \ + echo -L$$TARGET_SYSTEM_ROOT/usr/lib/threads -lpthreads -lc_r $$TARGET_SYSTEM_ROOT/usr/lib/libc.a ;; \ *) echo -lc ;; esac` ; \ $(STRIP_FOR_TARGET) -X32_64 -e $$shr.o ; \ { echo "\#! $(SHLIB_SONAME)($$shr.o)" ; \