From patchwork Mon Aug 7 10:32:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=b+GhNQbo; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDPb2RWJz1yYC for ; Mon, 7 Aug 2023 21:20:03 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4F09A3853D0F for ; Mon, 7 Aug 2023 11:20:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F09A3853D0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407201; bh=ryOnwvb3/PAtJ6Gk685uD/+n/gHHb22w9zIEpN2WCSk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=b+GhNQboJqM4CATfA7/1m9Orf80XD5z6tjdUTKDK/8fsdOobym15jhCZAh3Pl3W5l zxeRO78CkjRsOvq0cSROp07ZqslM8t3dcPB85s7hNb9oBsIXq6tsvr4Onzf2CHG3ii FBHVpu1jgj+EakoBJt+eKhlWkw1eEE6+8IAjLVHo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id 08CFC3858417 for ; Mon, 7 Aug 2023 11:19:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08CFC3858417 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDNX1mwLz9snW; Mon, 7 Aug 2023 13:19:08 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Arsen_Arsenovi=C4=87?= Subject: [PATCH 01/24] toplevel: Substitute GDCFLAGS instead of using CFLAGS Date: Mon, 7 Aug 2023 12:32:43 +0200 Message-ID: <20230807105935.2098236-2-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" r14-2875-g1ed21e23d6d4da ("Use substituted GDCFLAGS") already implemented this change, but only on the generated file rather than in the template it is generated from. ChangeLog: * Makefile.tpl: Substitute @GDCFLAGS@ instead of using $(CFLAGS). --- Makefile.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.tpl b/Makefile.tpl index d0fe7e2fb77..4fdca604eb0 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -447,7 +447,7 @@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) -GDCFLAGS = $(CFLAGS) +GDCFLAGS = @GDCFLAGS@ GM2FLAGS = $(CFLAGS) # Pass additional PGO and LTO compiler options to the PGO build. From patchwork Mon Aug 7 10:32:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817845 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=VoUapoSE; dkim-atps=neutral Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDSm09G9z1yYC for ; Mon, 7 Aug 2023 21:22:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0F1AE385E00F for ; Mon, 7 Aug 2023 11:22:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F1AE385E00F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407366; bh=Imf2H/qM51In3ISCCO3n7Sxve4/YYDil7uCG11rll10=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=VoUapoSE3J/w5MKrxF6LSCIIGV4tvZFchzBqhnTUDnSlpyxHFXerYimYFDiKfCrSJ clsWAff/RnbMoJomHJ3Oa+vX1mHopcv5eTkkPYgEHT2PA5JIrTW+eQ3EdcuFPKAZ8Y EgDHuGpTVlblQSGwyIgyBHrZoR7ZdO5o3XfeD5tk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by sourceware.org (Postfix) with ESMTPS id EFC68385841C for ; Mon, 7 Aug 2023 11:19:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFC68385841C Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDNY1d6sz9snw; Mon, 7 Aug 2023 13:19:09 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Alan Modra Subject: [PATCH 02/24] PR29961, plugin-api.h: "Could not detect architecture endianess" Date: Mon, 7 Aug 2023 12:32:44 +0200 Message-ID: <20230807105935.2098236-3-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNY1d6sz9snw X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Alan Modra Found when attempting to build binutils on sparc sunos-5.8 where sys/byteorder.h defines _BIG_ENDIAN but not any of the BYTE_ORDER variants. This patch adds the extra tests to cope with the old machine, and tidies the header a little. include/ChangeLog: * plugin-api.h: When handling non-gcc or gcc < 4.6.0 include necessary header files before testing macros. Make more use of #elif. Test _LITTLE_ENDIAN and _BIG_ENDIAN in final tests. --- include/plugin-api.h | 49 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/include/plugin-api.h b/include/plugin-api.h index 395d5bcc598..f3cf2d8101b 100644 --- a/include/plugin-api.h +++ b/include/plugin-api.h @@ -37,7 +37,7 @@ #error cannot find uint64_t type #endif -/* Detect endianess based on __BYTE_ORDER__ macro. */ +/* Detect endianess based on gcc's (>=4.6.0) __BYTE_ORDER__ macro. */ #if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \ defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_PDP_ENDIAN__) #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ @@ -47,46 +47,47 @@ #elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__ #define PLUGIN_PDP_ENDIAN 1 #endif + #else -/* Older GCC releases (<4.6.0) can make detection from glibc macros. */ +/* Include header files to define endian macros. */ #if defined(__GLIBC__) || defined(__GNU_LIBRARY__) || defined(__ANDROID__) #include -#ifdef __BYTE_ORDER -#if __BYTE_ORDER == __LITTLE_ENDIAN -#define PLUGIN_LITTLE_ENDIAN 1 -#elif __BYTE_ORDER == __BIG_ENDIAN -#define PLUGIN_BIG_ENDIAN 1 -#endif -#endif -#endif -/* Include all necessary header files based on target. */ -#if defined(__SVR4) && defined(__sun) + +#elif defined(__SVR4) && defined(__sun) #include -#endif -#if defined(__FreeBSD__) || defined(__NetBSD__) || \ - defined(__DragonFly__) || defined(__minix) + +#elif defined(__FreeBSD__) || defined(__NetBSD__) || \ + defined(__DragonFly__) || defined(__minix) #include -#endif -#if defined(__OpenBSD__) + +#elif defined(__OpenBSD__) #include #endif + +/* Detect endianess based on __BYTE_ORDER. */ +#ifdef __BYTE_ORDER +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define PLUGIN_LITTLE_ENDIAN 1 +#elif __BYTE_ORDER == __BIG_ENDIAN +#define PLUGIN_BIG_ENDIAN 1 +#endif + /* Detect endianess based on _BYTE_ORDER. */ -#ifdef _BYTE_ORDER +#elif defined _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN #define PLUGIN_LITTLE_ENDIAN 1 #elif _BYTE_ORDER == _BIG_ENDIAN #define PLUGIN_BIG_ENDIAN 1 #endif -#endif + /* Detect based on _WIN32. */ -#if defined(_WIN32) +#elif defined _WIN32 #define PLUGIN_LITTLE_ENDIAN 1 -#endif + /* Detect based on __BIG_ENDIAN__ and __LITTLE_ENDIAN__ */ -#ifdef __LITTLE_ENDIAN__ +#elif defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN #define PLUGIN_LITTLE_ENDIAN 1 -#endif -#ifdef __BIG_ENDIAN__ +#elif defined __BIG_ENDIAN__ || defined _BIG_ENDIAN #define PLUGIN_BIG_ENDIAN 1 #endif #endif From patchwork Mon Aug 7 10:32:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=IfDKec+5; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDRd534zz1yYC for ; Mon, 7 Aug 2023 21:21:49 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9BB073883019 for ; Mon, 7 Aug 2023 11:21:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BB073883019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407307; bh=EGptTqDxIxV/uNa6z/KTzlZUkNSY215uhU9g+18WLuo=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=IfDKec+5NF5Jj2SexjT6JI/r9bV3it7iXaWgt9T9iz0dWNxSacihrfZMvuZmpUAUy CE+7PU7dvAca9oazP5iL0DhXlir8uXDQIklz1huMDocrsjq5r8KqpFTYvaqjE6Ib67 +ooOT6eeOrWxY14DfFjMi/UGRGbROlEVexXu8WcY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id E8C54385841D for ; Mon, 7 Aug 2023 11:19:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E8C54385841D Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RKDNZ238kz9sZL; Mon, 7 Aug 2023 13:19:10 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Alan Modra Subject: [PATCH 03/24] gcc-4.5 build fixes Date: Mon, 7 Aug 2023 12:32:45 +0200 Message-ID: <20230807105935.2098236-4-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Alan Modra Trying to build binutils with an older gcc currently fails. Working around these gcc bugs is not onerous so let's fix them. include/ChangeLog: * xtensa-dynconfig.h (xtensa_isa_internal): Delete unnecessary forward declaration. --- include/xtensa-dynconfig.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/xtensa-dynconfig.h b/include/xtensa-dynconfig.h index 48877ebb6b6..45d54dcd0e0 100644 --- a/include/xtensa-dynconfig.h +++ b/include/xtensa-dynconfig.h @@ -121,8 +121,6 @@ struct xtensa_config_v4 int xchal_unaligned_store_hw; }; -typedef struct xtensa_isa_internal_struct xtensa_isa_internal; - extern const void *xtensa_load_config (const char *name, const void *no_plugin_def, const void *no_name_def); From patchwork Mon Aug 7 10:32:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=xJVP2AdT; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDX93C9gz1yVt for ; Mon, 7 Aug 2023 21:25:45 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6BF283889823 for ; Mon, 7 Aug 2023 11:25:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6BF283889823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407543; bh=ztArS07UorisaBSS2nr5YztnooE93DQELBicwj2+9+8=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=xJVP2AdTdwj29Es5E/LqQJiSriarTGM5YD8B+Qptm8+Ok9Ab3RPMFvq2g5g+cX6C1 yPwvMHYnAk1qRieb96or4J3Nsh09GgLZl06qVzsY2NqjSkwCBZPAPI0BszmhWANdwl kt0eipuJX1Swle1FnDSu+vBBBgUs2p1arfvwXAWM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 1974638582BC for ; Mon, 7 Aug 2023 11:19:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1974638582BC Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RKDNb3RQxz9sbM; Mon, 7 Aug 2023 13:19:11 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: "H.J. Lu" Subject: [PATCH 04/24] Sync with binutils: GCC: Pass --plugin to AR and RANLIB Date: Mon, 7 Aug 2023 12:32:46 +0200 Message-ID: <20230807105935.2098236-5-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_ASCII_DIVIDERS, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: "H.J. Lu" Sync with binutils for building binutils with LTO: 50ad1254d50 GCC: Pass --plugin to AR and RANLIB Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. ChangeLog: * Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. * configure.ac: Include config/gcc-plugin.m4. AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and RANLIB if possible. * Makefile.in: Regenerated. * configure: Likewise. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. libiberty/ChangeLog: * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. (configure_deps): Depend on ../config/gcc-plugin.m4. * configure.ac: AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * aclocal.m4: Regenerated. * configure: Likewise. zlib/ChangeLog: * configure: Regenerated. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. --- Makefile.in | 5 +++-- Makefile.tpl | 5 +++-- config/gcc-plugin.m4 | 28 ++++++++++++++++++++++++++++ configure | 39 +++++++++++++++++++++++++++++++++++++++ configure.ac | 15 +++++++++++++++ gcc/configure | 27 +++++++++++++++++++++++++-- libatomic/configure | 27 +++++++++++++++++++++++++-- libbacktrace/configure | 27 +++++++++++++++++++++++++-- libcc1/configure | 27 +++++++++++++++++++++++++-- libffi/configure | 27 +++++++++++++++++++++++++-- libgfortran/configure | 27 +++++++++++++++++++++++++-- libgm2/configure | 27 +++++++++++++++++++++++++-- libgomp/configure | 27 +++++++++++++++++++++++++-- libiberty/Makefile.in | 5 +++-- libiberty/aclocal.m4 | 1 + libiberty/configure | 37 +++++++++++++++++++++++++++++++++++++ libiberty/configure.ac | 12 ++++++++++++ libitm/configure | 27 +++++++++++++++++++++++++-- libobjc/configure | 27 +++++++++++++++++++++++++-- libphobos/configure | 27 +++++++++++++++++++++++++-- libquadmath/configure | 27 +++++++++++++++++++++++++-- libsanitizer/configure | 27 +++++++++++++++++++++++++-- libssp/configure | 27 +++++++++++++++++++++++++-- libstdc++-v3/configure | 39 +++++++++++++++++++++++++++++++-------- libtool.m4 | 25 ++++++++++++++++++++++++- libvtv/configure | 27 +++++++++++++++++++++++++-- lto-plugin/configure | 27 +++++++++++++++++++++++++-- zlib/configure | 27 +++++++++++++++++++++++++-- 28 files changed, 621 insertions(+), 49 deletions(-) diff --git a/Makefile.in b/Makefile.in index 144bccd2603..6539fb201dc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -417,7 +417,7 @@ MAKEINFOFLAGS = --split-size=5000000 # --------------------------------------------- AS = @AS@ -AR = @AR@ +AR = @AR@ @AR_PLUGIN_OPTION@ AR_FLAGS = rc CC = @CC@ CXX = @CXX@ @@ -428,7 +428,7 @@ LIPO = @LIPO@ NM = @NM@ OBJDUMP = @OBJDUMP@ OTOOL = @OTOOL@ -RANLIB = @RANLIB@ +RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@ READELF = @READELF@ STRIP = @STRIP@ WINDRES = @WINDRES@ @@ -66748,6 +66748,7 @@ AUTOCONF = autoconf $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \ $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4 \ $(srcdir)/config/elf.m4 $(srcdir)/config/isl.m4 \ + $(srcdir)/config/gcc-plugin.m4 \ $(srcdir)/libtool.m4 $(srcdir)/ltoptions.m4 $(srcdir)/ltsugar.m4 \ $(srcdir)/ltversion.m4 $(srcdir)/lt~obsolete.m4 cd $(srcdir) && $(AUTOCONF) diff --git a/Makefile.tpl b/Makefile.tpl index 4fdca604eb0..6586e907964 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -420,7 +420,7 @@ MAKEINFOFLAGS = --split-size=5000000 # --------------------------------------------- AS = @AS@ -AR = @AR@ +AR = @AR@ @AR_PLUGIN_OPTION@ AR_FLAGS = rc CC = @CC@ CXX = @CXX@ @@ -431,7 +431,7 @@ LIPO = @LIPO@ NM = @NM@ OBJDUMP = @OBJDUMP@ OTOOL = @OTOOL@ -RANLIB = @RANLIB@ +RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@ READELF = @READELF@ STRIP = @STRIP@ WINDRES = @WINDRES@ @@ -2106,6 +2106,7 @@ AUTOCONF = autoconf $(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4 \ $(srcdir)/config/override.m4 $(srcdir)/config/proginstall.m4 \ $(srcdir)/config/elf.m4 $(srcdir)/config/isl.m4 \ + $(srcdir)/config/gcc-plugin.m4 \ $(srcdir)/libtool.m4 $(srcdir)/ltoptions.m4 $(srcdir)/ltsugar.m4 \ $(srcdir)/ltversion.m4 $(srcdir)/lt~obsolete.m4 cd $(srcdir) && $(AUTOCONF) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 2ccb9ca7258..d782d52858e 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -129,3 +129,31 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], fi fi ]) + +dnl +dnl +dnl GCC_PLUGIN_OPTION +dnl (SHELL-CODE_HANDLER) +dnl +AC_DEFUN([GCC_PLUGIN_OPTION],[dnl +AC_MSG_CHECKING([for -plugin option]) + +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -n "$plugin_option"; then + $1="$plugin_option" + AC_MSG_RESULT($plugin_option) +else + AC_MSG_RESULT([no]) +fi +]) diff --git a/configure b/configure index 3269da9829f..4aa1ca21a38 100755 --- a/configure +++ b/configure @@ -620,6 +620,8 @@ GFORTRAN_FOR_TARGET GCC_FOR_TARGET CXX_FOR_TARGET CC_FOR_TARGET +RANLIB_PLUGIN_OPTION +AR_PLUGIN_OPTION GDCFLAGS READELF OTOOL @@ -12949,6 +12951,43 @@ fi GDCFLAGS=${GDCFLAGS-${CFLAGS}} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } + +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -n "$plugin_option"; then + PLUGIN_OPTION="$plugin_option" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +AR_PLUGIN_OPTION= +RANLIB_PLUGIN_OPTION= +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + fi +fi + + + # Target tools. # Check whether --with-build-time-tools was given. diff --git a/configure.ac b/configure.ac index d07a0fa7698..a11b1006427 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,7 @@ m4_include(config/override.m4) m4_include(config/proginstall.m4) m4_include(config/elf.m4) m4_include(config/ax_cxx_compile_stdcxx.m4) +m4_include(config/gcc-plugin.m4) m4_include([libtool.m4]) m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) @@ -3664,6 +3665,20 @@ AC_SUBST(GDC) AC_SUBST(GDCFLAGS) GDCFLAGS=${GDCFLAGS-${CFLAGS}} +GCC_PLUGIN_OPTION(PLUGIN_OPTION) +AR_PLUGIN_OPTION= +RANLIB_PLUGIN_OPTION= +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + fi +fi +AC_SUBST(AR_PLUGIN_OPTION) +AC_SUBST(RANLIB_PLUGIN_OPTION) + # Target tools. AC_ARG_WITH([build-time-tools], [AS_HELP_STRING([--with-build-time-tools=PATH], diff --git a/gcc/configure b/gcc/configure index c341ee12a8a..7c4a544fb19 100755 --- a/gcc/configure +++ b/gcc/configure @@ -14899,6 +14899,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -14992,6 +15005,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -15196,6 +15214,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -19850,7 +19873,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19853 "configure" +#line 19876 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19956,7 +19979,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19959 "configure" +#line 19982 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libatomic/configure b/libatomic/configure index 1994662b7c5..739613c097c 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -6144,6 +6144,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6237,6 +6250,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6441,6 +6459,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -11364,7 +11387,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11367 "configure" +#line 11390 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11470,7 +11493,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11473 "configure" +#line 11496 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libbacktrace/configure b/libbacktrace/configure index 88156e2c63b..ba778f8d407 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -6589,6 +6589,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6682,6 +6695,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6886,6 +6904,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -11541,7 +11564,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11544 "configure" +#line 11567 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11647,7 +11670,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11650 "configure" +#line 11673 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libcc1/configure b/libcc1/configure index bae3b8712b6..c2607b31bce 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -5850,6 +5850,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -5943,6 +5956,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6147,6 +6165,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -10801,7 +10824,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10804 "configure" +#line 10827 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10907,7 +10930,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10910 "configure" +#line 10933 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libffi/configure b/libffi/configure index 2bb9f8d83d6..2d177916c1e 100755 --- a/libffi/configure +++ b/libffi/configure @@ -6376,6 +6376,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6469,6 +6482,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6673,6 +6691,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -11596,7 +11619,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11599 "configure" +#line 11622 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11702,7 +11725,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11705 "configure" +#line 11728 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgfortran/configure b/libgfortran/configure index 1cde8e8f025..12b6e18602d 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -7778,6 +7778,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -7871,6 +7884,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -8075,6 +8093,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12761,7 +12784,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12764 "configure" +#line 12787 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12867,7 +12890,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12870 "configure" +#line 12893 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgm2/configure b/libgm2/configure index da3d3bd4391..b7bca2d4e88 100755 --- a/libgm2/configure +++ b/libgm2/configure @@ -7680,6 +7680,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -7773,6 +7786,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7977,6 +7995,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12664,7 +12687,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12667 "configure" +#line 12690 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12770,7 +12793,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12773 "configure" +#line 12796 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgomp/configure b/libgomp/configure index e4e79c5199a..5b52e6fe4a8 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -6158,6 +6158,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6251,6 +6264,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6455,6 +6473,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -11378,7 +11401,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11381 "configure" +#line 11404 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11484,7 +11507,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11487 "configure" +#line 11510 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index 72608f3e4a7..f9fbba23e2c 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -50,13 +50,13 @@ mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs # Some compilers can't handle cc -c blah.c -o foo/blah.o. OUTPUT_OPTION = @OUTPUT_OPTION@ -AR = @AR@ +AR = @AR@ @AR_PLUGIN_OPTION@ AR_FLAGS = rc CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ -RANLIB = @RANLIB@ +RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@ MAKEINFO = @MAKEINFO@ PERL = @PERL@ @@ -507,6 +507,7 @@ aclocal_deps = \ $(srcdir)/../config/acx.m4 \ $(srcdir)/../config/cet.m4 \ $(srcdir)/../config/enable.m4 \ + $(srcdir)/../config/gcc-plugin.m4 \ $(srcdir)/../config/no-executables.m4 \ $(srcdir)/../config/override.m4 \ $(srcdir)/../config/picflag.m4 \ diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index 3378316dced..0757688d52a 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -15,6 +15,7 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun m4_include([../config/acx.m4]) m4_include([../config/cet.m4]) m4_include([../config/enable.m4]) +m4_include([../config/gcc-plugin.m4]) m4_include([../config/no-executables.m4]) m4_include([../config/picflag.m4]) m4_include([../config/warnings.m4]) diff --git a/libiberty/configure b/libiberty/configure index b8a19c42110..83c679b8a39 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -645,6 +645,8 @@ CPPFLAGS LDFLAGS CFLAGS CC +RANLIB_PLUGIN_OPTION +AR_PLUGIN_OPTION RANLIB AR host_os @@ -2936,6 +2938,41 @@ else fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } + +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done +if test -n "$plugin_option"; then + PLUGIN_OPTION="$plugin_option" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + + fi +fi + # Add --enable-multilib to configure. # Default to --enable-multilib # Check whether --enable-multilib was given. diff --git a/libiberty/configure.ac b/libiberty/configure.ac index 6747a7b5cff..0748c592704 100644 --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -114,6 +114,18 @@ dnl to call AC_CHECK_PROG. AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) +GCC_PLUGIN_OPTION(PLUGIN_OPTION) +if test -n "$PLUGIN_OPTION"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR_PLUGIN_OPTION="$PLUGIN_OPTION" + AC_SUBST(AR_PLUGIN_OPTION) + fi + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" + AC_SUBST(RANLIB_PLUGIN_OPTION) + fi +fi + dnl When switching to automake, replace the following with AM_ENABLE_MULTILIB. # Add --enable-multilib to configure. # Default to --enable-multilib diff --git a/libitm/configure b/libitm/configure index 74a8f4affd5..bcc853c5f4b 100755 --- a/libitm/configure +++ b/libitm/configure @@ -6819,6 +6819,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6912,6 +6925,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7116,6 +7134,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12040,7 +12063,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12043 "configure" +#line 12066 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12146,7 +12169,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12149 "configure" +#line 12172 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libobjc/configure b/libobjc/configure index 6da20b8e4ff..03b1162160c 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -5504,6 +5504,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -5597,6 +5610,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -5801,6 +5819,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -10796,7 +10819,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10799 "configure" +#line 10822 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10902,7 +10925,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10905 "configure" +#line 10928 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libphobos/configure b/libphobos/configure index d702c8f494c..ab611c8fc7f 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -6823,6 +6823,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6916,6 +6929,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7120,6 +7138,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -11774,7 +11797,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11777 "configure" +#line 11800 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11880,7 +11903,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11883 "configure" +#line 11906 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libquadmath/configure b/libquadmath/configure index 958fb876c5b..efbada5f3ef 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -5845,6 +5845,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -5938,6 +5951,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6142,6 +6160,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -10830,7 +10853,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10833 "configure" +#line 10856 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10936,7 +10959,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10939 "configure" +#line 10962 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libsanitizer/configure b/libsanitizer/configure index e7984f96615..a68acb5c99b 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -7432,6 +7432,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -7525,6 +7538,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7729,6 +7747,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12383,7 +12406,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12386 "configure" +#line 12409 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12489,7 +12512,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12492 "configure" +#line 12515 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libssp/configure b/libssp/configure index 492915d2ce0..d34178b2262 100755 --- a/libssp/configure +++ b/libssp/configure @@ -6031,6 +6031,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -6124,6 +6137,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -6328,6 +6346,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -11016,7 +11039,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11019 "configure" +#line 11042 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11122,7 +11145,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11125 "configure" +#line 11148 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 36f217c898c..e33235e6b76 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -7074,6 +7074,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -7167,6 +7180,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7371,6 +7389,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12187,7 +12210,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12190 "configure" +#line 12213 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12293,7 +12316,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12296 "configure" +#line 12319 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16017,7 +16040,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 16020 "configure" +#line 16043 "configure" int main() { typedef bool atomic_type; @@ -16052,7 +16075,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16055 "configure" +#line 16078 "configure" int main() { typedef short atomic_type; @@ -16087,7 +16110,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16090 "configure" +#line 16113 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -16123,7 +16146,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16126 "configure" +#line 16149 "configure" int main() { typedef long long atomic_type; @@ -16279,7 +16302,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16282 "configure" +#line 16305 "configure" int main() { _Decimal32 d1; @@ -16321,7 +16344,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16324 "configure" +#line 16347 "configure" template struct same { typedef T2 type; }; diff --git a/libtool.m4 b/libtool.m4 index b92e284d9f9..adf75bdc48b 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1325,8 +1325,26 @@ need_locks="$enable_libtool_lock" # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) +[plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + +AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) @@ -1337,6 +1355,11 @@ _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) diff --git a/libvtv/configure b/libvtv/configure index e7e490d8b3e..5f8e2bdbf39 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -7327,6 +7327,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -7420,6 +7433,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7624,6 +7642,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12278,7 +12301,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12281 "configure" +#line 12304 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12384,7 +12407,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12387 "configure" +#line 12410 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/lto-plugin/configure b/lto-plugin/configure index 675b9cfa522..3e70f6fdbde 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -7198,6 +7198,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -7291,6 +7304,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -7495,6 +7513,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -12150,7 +12173,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12153 "configure" +#line 12176 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12256,7 +12279,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12259 "configure" +#line 12282 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/zlib/configure b/zlib/configure index 9308866a636..1d141b36e39 100755 --- a/zlib/configure +++ b/zlib/configure @@ -5511,6 +5511,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown +plugin_option= +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +for plugin in $plugin_names; do + plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` + if test x$plugin_so = x$plugin; then + plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` + fi + if test x$plugin_so != x$plugin; then + plugin_option="--plugin $plugin_so" + break + fi +done + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -5604,6 +5617,11 @@ else fi test -z "$AR" && AR=ar +if test -n "$plugin_option"; then + if $AR --help 2>&1 | grep -q "\--plugin"; then + AR="$AR $plugin_option" + fi +fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -5808,6 +5826,11 @@ else fi test -z "$RANLIB" && RANLIB=: +if test -n "$plugin_option" && test "$RANLIB" != ":"; then + if $RANLIB --help 2>&1 | grep -q "\--plugin"; then + RANLIB="$RANLIB $plugin_option" + fi +fi @@ -10763,7 +10786,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10766 "configure" +#line 10789 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10869,7 +10892,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10872 "configure" +#line 10895 "configure" #include "confdefs.h" #if HAVE_DLFCN_H From patchwork Mon Aug 7 10:32:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817854 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=AF3JDR64; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDW638Jkz1yYC for ; Mon, 7 Aug 2023 21:24:50 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C5F1E3883006 for ; Mon, 7 Aug 2023 11:24:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5F1E3883006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407486; bh=tzl+Skt5UhJWDmawFiKal/G9PAe9rQ26dcnOIH04HUA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=AF3JDR64+23qhKlayEtMGSe74GyY8Qk2birfdlWiq7c3znMplYqgDlm1JaDOTX2IO yV/dRnumCu01pU7h/2AfPsH5YJSpS1uIReGXfe1ntsRfEZwxulVYW2bRkXmJXuZxoN 2y5+XusRIsDNowqADfMzswj76nf2HZB57oRQALbk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id 3BD91385842E for ; Mon, 7 Aug 2023 11:19:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BD91385842E Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDNc4TRmz9sp7; Mon, 7 Aug 2023 13:19:12 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: "H.J. Lu" Subject: [PATCH 05/24] GCC: Check if AR works with --plugin and rc Date: Mon, 7 Aug 2023 12:32:47 +0200 Message-ID: <20230807105935.2098236-6-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: "H.J. Lu" AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c ./ar: no operation specified [hjl@gnu-cfl-2 bin]$ ./ar --version GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112 Copyright (C) 2018 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. [hjl@gnu-cfl-2 bin]$ Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. ChangeLog: * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libiberty/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate. --- config/gcc-plugin.m4 | 12 +++++ configure | 103 +++++++++++++++++++++++++++++++++++++++++ gcc/configure | 14 ++++-- libatomic/configure | 14 ++++-- libbacktrace/configure | 14 ++++-- libcc1/configure | 14 ++++-- libffi/configure | 14 ++++-- libgfortran/configure | 14 ++++-- libgm2/configure | 14 ++++-- libgomp/configure | 14 ++++-- libiberty/configure | 103 +++++++++++++++++++++++++++++++++++++++++ libitm/configure | 14 ++++-- libobjc/configure | 14 ++++-- libphobos/configure | 14 ++++-- libquadmath/configure | 14 ++++-- libsanitizer/configure | 14 ++++-- libssp/configure | 14 ++++-- libstdc++-v3/configure | 26 +++++++---- libtool.m4 | 9 +++- libvtv/configure | 14 ++++-- lto-plugin/configure | 14 ++++-- zlib/configure | 14 ++++-- 22 files changed, 430 insertions(+), 61 deletions(-) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index d782d52858e..c731a6fab38 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -150,6 +150,18 @@ for plugin in $plugin_names; do break fi done +dnl Check if ${AR} $plugin_option rc works. +AC_CHECK_TOOL(AR, ar) +if test "${AR}" = "" ; then + AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + plugin_option= +fi +rm -f conftest.* if test -n "$plugin_option"; then $1="$plugin_option" AC_MSG_RESULT($plugin_option) diff --git a/configure b/configure index 4aa1ca21a38..3fe4a1804cf 100755 --- a/configure +++ b/configure @@ -12966,6 +12966,109 @@ for plugin in $plugin_names; do break fi done +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test "${AR}" = "" ; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= +fi +rm -f conftest.* if test -n "$plugin_option"; then PLUGIN_OPTION="$plugin_option" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 diff --git a/gcc/configure b/gcc/configure index 7c4a544fb19..55cb24ef453 100755 --- a/gcc/configure +++ b/gcc/configure @@ -15007,7 +15007,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -19873,7 +19881,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19876 "configure" +#line 19884 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19979,7 +19987,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19982 "configure" +#line 19990 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libatomic/configure b/libatomic/configure index 739613c097c..8e10b70d443 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -6252,7 +6252,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11387,7 +11395,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11390 "configure" +#line 11398 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11493,7 +11501,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11496 "configure" +#line 11504 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libbacktrace/configure b/libbacktrace/configure index ba778f8d407..d086b86a088 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -6697,7 +6697,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11564,7 +11572,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11567 "configure" +#line 11575 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11670,7 +11678,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11673 "configure" +#line 11681 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libcc1/configure b/libcc1/configure index c2607b31bce..84964de24de 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -5958,7 +5958,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -10824,7 +10832,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10827 "configure" +#line 10835 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10930,7 +10938,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10933 "configure" +#line 10941 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libffi/configure b/libffi/configure index 2d177916c1e..a1824ceaeb3 100755 --- a/libffi/configure +++ b/libffi/configure @@ -6484,7 +6484,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11619,7 +11627,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11622 "configure" +#line 11630 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11725,7 +11733,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11728 "configure" +#line 11736 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgfortran/configure b/libgfortran/configure index 12b6e18602d..425d1e32b39 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -7886,7 +7886,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12784,7 +12792,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12787 "configure" +#line 12795 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12890,7 +12898,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12893 "configure" +#line 12901 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgm2/configure b/libgm2/configure index b7bca2d4e88..d3c3ab06ada 100755 --- a/libgm2/configure +++ b/libgm2/configure @@ -7788,7 +7788,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12687,7 +12695,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12690 "configure" +#line 12698 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12793,7 +12801,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12796 "configure" +#line 12804 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgomp/configure b/libgomp/configure index 5b52e6fe4a8..49b43ba0967 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -6266,7 +6266,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11401,7 +11409,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11404 "configure" +#line 11412 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11507,7 +11515,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11510 "configure" +#line 11518 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libiberty/configure b/libiberty/configure index 83c679b8a39..bdc860f1623 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -2953,6 +2953,109 @@ for plugin in $plugin_names; do break fi done +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + +if test "${AR}" = "" ; then + as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 +fi +touch conftest.c +${AR} $plugin_option rc conftest.a conftest.c +if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + plugin_option= +fi +rm -f conftest.* if test -n "$plugin_option"; then PLUGIN_OPTION="$plugin_option" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 diff --git a/libitm/configure b/libitm/configure index bcc853c5f4b..6961eb879b3 100755 --- a/libitm/configure +++ b/libitm/configure @@ -6927,7 +6927,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12063,7 +12071,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12066 "configure" +#line 12074 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12169,7 +12177,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12172 "configure" +#line 12180 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libobjc/configure b/libobjc/configure index 03b1162160c..cbac20271cf 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -5612,7 +5612,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -10819,7 +10827,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10822 "configure" +#line 10830 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10925,7 +10933,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10928 "configure" +#line 10936 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libphobos/configure b/libphobos/configure index ab611c8fc7f..7c453f58771 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -6931,7 +6931,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11797,7 +11805,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11800 "configure" +#line 11808 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11903,7 +11911,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11906 "configure" +#line 11914 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libquadmath/configure b/libquadmath/configure index efbada5f3ef..60844f38265 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -5953,7 +5953,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -10853,7 +10861,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10856 "configure" +#line 10864 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10959,7 +10967,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10962 "configure" +#line 10970 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libsanitizer/configure b/libsanitizer/configure index a68acb5c99b..52c6677793e 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -7540,7 +7540,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12406,7 +12414,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12409 "configure" +#line 12417 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12512,7 +12520,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12515 "configure" +#line 12523 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libssp/configure b/libssp/configure index d34178b2262..fdf4e9d234d 100755 --- a/libssp/configure +++ b/libssp/configure @@ -6139,7 +6139,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11039,7 +11047,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11042 "configure" +#line 11050 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11145,7 +11153,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11148 "configure" +#line 11156 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index e33235e6b76..b280071391d 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -7182,7 +7182,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12210,7 +12218,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12213 "configure" +#line 12221 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12316,7 +12324,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12319 "configure" +#line 12327 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16040,7 +16048,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 16043 "configure" +#line 16051 "configure" int main() { typedef bool atomic_type; @@ -16075,7 +16083,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16078 "configure" +#line 16086 "configure" int main() { typedef short atomic_type; @@ -16110,7 +16118,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16113 "configure" +#line 16121 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -16146,7 +16154,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16149 "configure" +#line 16157 "configure" int main() { typedef long long atomic_type; @@ -16302,7 +16310,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16305 "configure" +#line 16313 "configure" int main() { _Decimal32 d1; @@ -16344,7 +16352,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16347 "configure" +#line 16355 "configure" template struct same { typedef T2 type; }; diff --git a/libtool.m4 b/libtool.m4 index adf75bdc48b..7af548938ec 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1342,7 +1342,14 @@ AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + AC_MSG_WARN([Failed: $AR $plugin_option rc]) + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru diff --git a/libvtv/configure b/libvtv/configure index 5f8e2bdbf39..33ca49e63c6 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -7435,7 +7435,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12301,7 +12309,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12304 "configure" +#line 12312 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12407,7 +12415,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12410 "configure" +#line 12418 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/lto-plugin/configure b/lto-plugin/configure index 3e70f6fdbde..69ccd66b038 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -7306,7 +7306,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12173,7 +12181,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12176 "configure" +#line 12184 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12279,7 +12287,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12282 "configure" +#line 12290 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/zlib/configure b/zlib/configure index 1d141b36e39..29eeb350429 100755 --- a/zlib/configure +++ b/zlib/configure @@ -5619,7 +5619,15 @@ fi test -z "$AR" && AR=ar if test -n "$plugin_option"; then if $AR --help 2>&1 | grep -q "\--plugin"; then - AR="$AR $plugin_option" + touch conftest.c + $AR $plugin_option rc conftest.a conftest.c + if test "$?" != 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -10786,7 +10794,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10789 "configure" +#line 10797 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10892,7 +10900,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10895 "configure" +#line 10903 "configure" #include "confdefs.h" #if HAVE_DLFCN_H From patchwork Mon Aug 7 10:32:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=L2w3bRrQ; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDSs5mJLz1yYC for ; Mon, 7 Aug 2023 21:22:53 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD8D4389366A for ; Mon, 7 Aug 2023 11:22:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CD8D4389366A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407371; bh=kjFqsTfb3lDRb149kovMGRWF9+jxwgpb8drB8HNcM8U=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=L2w3bRrQCGZDdhigH6UoaI366cKlrbQpEMAKIjk2GLOEfwPwvm+fGDtFAaBgWbgZy wX3BaJuymKUu4iNX/HDOGXZrIBi5eAF6ZmDgZjqVS3QS/FjSgibi/zDwjABSM/4KRV kS5btw0xnG3MzVU1cBn9YEv7UXTp8pJX2EvzI06c= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 2D6113857707 for ; Mon, 7 Aug 2023 11:19:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D6113857707 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RKDNd4BQBz9tHr; Mon, 7 Aug 2023 13:19:13 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Arsen_Arsenovi=C4=87?= Subject: [PATCH 06/24] toplevel: Recover tilegx/tilepro targets Date: Mon, 7 Aug 2023 12:32:48 +0200 Message-ID: <20230807105935.2098236-7-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNd4BQBz9tHr X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" These are still supported in Binutils. ChangeLog: * configure: Regenerate. * configure.ac: Recover tilegx/tilepro targets. --- configure | 5 ++++- configure.ac | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3fe4a1804cf..04369383079 100755 --- a/configure +++ b/configure @@ -3072,7 +3072,7 @@ case "${ENABLE_GOLD}" in # Check for target supported by gold. case "${target}" in i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ - | aarch64*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) + | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -3977,6 +3977,9 @@ case "${target}" in tic6x-*-*) noconfigdirs="$noconfigdirs sim" ;; + tilepro*-*-* | tilegx*-*-*) + noconfigdirs="$noconfigdirs sim" + ;; v810-*-*) noconfigdirs="$noconfigdirs bfd binutils gas gdb ld opcodes target-libgloss" ;; diff --git a/configure.ac b/configure.ac index a11b1006427..3632216fd1c 100644 --- a/configure.ac +++ b/configure.ac @@ -360,7 +360,7 @@ case "${ENABLE_GOLD}" in # Check for target supported by gold. case "${target}" in i?86-*-* | x86_64-*-* | sparc*-*-* | powerpc*-*-* | arm*-*-* \ - | aarch64*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) + | aarch64*-*-* | tilegx*-*-* | mips*-*-* | s390*-*-* | loongarch*-*-*) configdirs="$configdirs gold" if test x${ENABLE_GOLD} = xdefault; then default_ld=gold @@ -1227,6 +1227,9 @@ case "${target}" in tic6x-*-*) noconfigdirs="$noconfigdirs sim" ;; + tilepro*-*-* | tilegx*-*-*) + noconfigdirs="$noconfigdirs sim" + ;; v810-*-*) noconfigdirs="$noconfigdirs bfd binutils gas gdb ld opcodes target-libgloss" ;; From patchwork Mon Aug 7 10:32:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817849 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=avEsvz6o; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDV55lsyz1yYC for ; Mon, 7 Aug 2023 21:23:57 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C9ECE38A90BC for ; Mon, 7 Aug 2023 11:23:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9ECE38A90BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407435; bh=0S7ib93ACMHwls79OtpZ395ezOjm3TIbzdGqe6Vo114=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=avEsvz6olnebFjw5NPLkTSqYhCw+u7lBuMJw7OLFj0HnLEYlV7WS8qAv9MRxOV6sv cAUyM4LhpMk52lsSnSgBjHd9dK0ipAKktQTp0WGxpdjAYbOoRFQdfUyG5dH54hucRX U/rCkS1RzdtLlDGx6mmeQDeXI9FCdiOHy7mCBxNQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) by sourceware.org (Postfix) with ESMTPS id 500DF3858439 for ; Mon, 7 Aug 2023 11:19:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 500DF3858439 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RKDNf4cYmz9sn2; Mon, 7 Aug 2023 13:19:14 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Fangrui Song Subject: [PATCH 07/24] binutils, gdb: support zstd compressed debug sections Date: Mon, 7 Aug 2023 12:32:49 +0200 Message-ID: <20230807105935.2098236-8-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNf4cYmz9sn2 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Fangrui Song PR29397 PR29563: Add new configure option --with-zstd which defaults to auto. If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support zstd compressed debug sections for most tools. * bfd: for addr2line, objdump --dwarf, gdb, etc * gas: support --compress-debug-sections=zstd * ld: support ELFCOMPRESS_ZSTD input and --compress-debug-sections=zstd * objcopy: support ELFCOMPRESS_ZSTD input for --decompress-debug-sections and --compress-debug-sections=zstd * gdb: support ELFCOMPRESS_ZSTD input. The bfd change references zstd symbols, so gdb has to link against -lzstd in this patch. If zstd is not supported, ELFCOMPRESS_ZSTD input triggers an error. We can avoid HAVE_ZSTD if binutils-gdb imports zstd/ like zlib/, but this is too heavyweight, so don't do it for now. ``` % ld/ld-new a.o ld/ld-new: a.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support ... % ld/ld-new a.o --compress-debug-sections=zstd ld/ld-new: --compress-debug-sections=zstd: ld is not built with zstd support % binutils/objcopy --compress-debug-sections=zstd a.o b.o binutils/objcopy: --compress-debug-sections=zstd: binutils is not built with zstd support % binutils/objcopy b.o --decompress-debug-sections binutils/objcopy: zstd.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support ... ``` config/ChangeLog: * zstd.m4: New file. ChangeLog: * configure: Regenerate. * configure.ac: Add --with-zstd. --- config/zstd.m4 | 23 +++++++++++++++++++++++ configure | 10 ++++++++++ configure.ac | 3 +++ 3 files changed, 36 insertions(+) create mode 100644 config/zstd.m4 diff --git a/config/zstd.m4 b/config/zstd.m4 new file mode 100644 index 00000000000..6da4db68c58 --- /dev/null +++ b/config/zstd.m4 @@ -0,0 +1,23 @@ +dnl Copyright (C) 2022 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl Enable features using the zstd library. +AC_DEFUN([AC_ZSTD], [ +AC_ARG_WITH(zstd, + [AS_HELP_STRING([--with-zstd], [support zstd compressed debug sections (default=auto)])], + [], [with_zstd=auto]) + +AS_IF([test "$with_zstd" != no], + [PKG_CHECK_MODULES(ZSTD, [libzstd], [ + AC_DEFINE(HAVE_ZSTD, 1, [Define to 1 if zstd is enabled.]) + ], [ + if test "$with_zstd" = yes; then + AC_MSG_ERROR([--with-zstd was given, but pkgconfig/libzstd.pc is not found]) + fi + ]) + ]) +]) diff --git a/configure b/configure index 04369383079..a5f6282bb0e 100755 --- a/configure +++ b/configure @@ -800,6 +800,7 @@ ac_user_opts=' enable_option_checking with_build_libsubdir with_system_zlib +with_zstd enable_as_accelerator_for enable_offload_targets enable_offload_defaulted @@ -1589,6 +1590,8 @@ Optional Packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-build-libsubdir=DIR Directory where to find libraries for build system --with-system-zlib use installed libz + --with-zstd Support zstd compressed debug sections + (default=auto) --with-mpc=PATH specify prefix directory for installed MPC package. Equivalent to --with-mpc-include=PATH/include plus --with-mpc-lib=PATH/lib @@ -2962,6 +2965,13 @@ if test x$with_system_readline = xyes ; then noconfigdirs="$noconfigdirs readline" fi + +# Check whether --with-zstd was given. +if test "${with_zstd+set}" = set; then : + withval=$with_zstd; +fi + + # some tools are so dependent upon X11 that if we're not building with X, # it's not even worth trying to configure, much less build, that tool. diff --git a/configure.ac b/configure.ac index 3632216fd1c..e820940c81e 100644 --- a/configure.ac +++ b/configure.ac @@ -254,6 +254,9 @@ if test x$with_system_readline = xyes ; then noconfigdirs="$noconfigdirs readline" fi +AC_ARG_WITH(zstd, +[AS_HELP_STRING([--with-zstd], [Support zstd compressed debug sections (default=auto)])]) + # some tools are so dependent upon X11 that if we're not building with X, # it's not even worth trying to configure, much less build, that tool. From patchwork Mon Aug 7 10:32:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817847 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=CEKkYdPy; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDV0625gz1yYC for ; Mon, 7 Aug 2023 21:23:52 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CEC8538A815A for ; Mon, 7 Aug 2023 11:23:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEC8538A815A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407430; bh=LVPqUCmHK05L539AOwJg33McQRmky2KFaTT4NHMMO2c=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=CEKkYdPyNIrwxxCSgTToHUnhQnBgZTdo8V8XP4XaFCjWJeL8VksRMgjpBfvxFZjep 3SPu1tss2HQFh+ZAqeisHErngaE/7MqawN3mJull5Va0bMFbVXFFH1j4wnptbQW6Ix P8hcqz/8cM1Db4CLTsgKvBSB/PyKYNrwwjLT6cE0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id 4423738582BD for ; Mon, 7 Aug 2023 11:19:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4423738582BD Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4RKDNg4j59z9sSv; Mon, 7 Aug 2023 13:19:15 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Christophe Lyon Subject: [PATCH 08/24] configure: require libzstd >= 1.4.0 Date: Mon, 7 Aug 2023 12:32:50 +0200 Message-ID: <20230807105935.2098236-9-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNg4j59z9sSv X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Christophe Lyon gas uses ZSTD_compressStream2 which is only available with libzstd >= 1.4.0, leading to build errors when an older version is installed. This patch updates the check libzstd presence to check its version is >= 1.4.0. However, since gas seems to be the only component requiring such a recent version this may imply that we disable ZSTD support for all components although some would still benefit from an older version. I ran 'autoreconf -f' in all directories containing a configure.ac file, using vanilla autoconf-2.69 and automake-1.15.1. I noticed several errors from autoheader in readline, as well as warnings in intl, but they are unrelated to this patch. This should fix some of the buildbots. OK for trunk? Thanks, Christophe config/ChangeLog: * zstd.m4: Add minimum version requirement of 1.4.0. --- config/zstd.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/zstd.m4 b/config/zstd.m4 index 6da4db68c58..eb34c0f36d7 100644 --- a/config/zstd.m4 +++ b/config/zstd.m4 @@ -12,7 +12,7 @@ AC_ARG_WITH(zstd, [], [with_zstd=auto]) AS_IF([test "$with_zstd" != no], - [PKG_CHECK_MODULES(ZSTD, [libzstd], [ + [PKG_CHECK_MODULES(ZSTD, [libzstd >= 1.4.0], [ AC_DEFINE(HAVE_ZSTD, 1, [Define to 1 if zstd is enabled.]) ], [ if test "$with_zstd" = yes; then From patchwork Mon Aug 7 10:32:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817839 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=cXvtFWfo; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDRQ5nF4z1yYC for ; Mon, 7 Aug 2023 21:21:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C128D385734E for ; Mon, 7 Aug 2023 11:21:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C128D385734E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407296; bh=xIWZdVdryn9cv1+ogRSKYpZKG5W2v7sap9Db1KzBjEk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=cXvtFWfoQHjaLPMAdjniBeLgnqYOe97sZ/YIQuKBYmU29m3TPZkFcCewIxFmuhMEy MktEv4rpot81FixVrN/mlfWPhsSdFvwVE5AgFDusvpwgfRrLqHSQMd/m9/xS3AaVou JsAeApvwNf8yD373OGQ5bv4X/FMit3lN+hOI2WX4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id 705983857737 for ; Mon, 7 Aug 2023 11:19:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 705983857737 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4RKDNh5Hd9z9smv; Mon, 7 Aug 2023 13:19:16 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Martin Liska Subject: [PATCH 09/24] add --enable-default-compressed-debug-sections-algorithm configure option Date: Mon, 7 Aug 2023 12:32:51 +0200 Message-ID: <20230807105935.2098236-10-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Martin Liska ChangeLog: * configure.ac: Add --enable-default-compressed-debug-sections-algorithm. * configure: Regenerate. --- configure | 13 +++++++++++++ configure.ac | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/configure b/configure index a5f6282bb0e..c5f6ae8e745 100755 --- a/configure +++ b/configure @@ -807,6 +807,7 @@ enable_offload_defaulted enable_gold enable_ld enable_compressed_debug_sections +enable_default_compressed_debug_sections_algorithm enable_libquadmath enable_libquadmath_support enable_libada @@ -1546,6 +1547,9 @@ Optional Features: --enable-compressed-debug-sections={all,gas,gold,ld,none} Enable compressed debug sections for gas, gold or ld by default + --enable-default-compressed-debug-sections-algorithm={zlib,zstd} + Default compression algorithm for + --enable-compressed-debug-sections. --disable-libquadmath do not build libquadmath directory --disable-libquadmath-support disable libquadmath support for Fortran @@ -3142,6 +3146,15 @@ else fi +# Select default compression algorithm. +# Check whether --enable-default_compressed_debug_sections_algorithm was given. +if test "${enable_default_compressed_debug_sections_algorithm+set}" = set; then : + enableval=$enable_default_compressed_debug_sections_algorithm; +else + default_compressed_debug_sections_algorithm= +fi + + # Configure extra directories which are host specific case "${host}" in diff --git a/configure.ac b/configure.ac index e820940c81e..ef30300af28 100644 --- a/configure.ac +++ b/configure.ac @@ -418,6 +418,12 @@ AC_ARG_ENABLE(compressed_debug_sections, fi ], [enable_compressed_debug_sections=]) +# Select default compression algorithm. +AC_ARG_ENABLE(default_compressed_debug_sections_algorithm, +[AS_HELP_STRING([--enable-default-compressed-debug-sections-algorithm={zlib,zstd}], + [Default compression algorithm for --enable-compressed-debug-sections.])], +[], [default_compressed_debug_sections_algorithm=]) + # Configure extra directories which are host specific case "${host}" in From patchwork Mon Aug 7 10:32:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817865 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=pAdKTz23; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDbS2ytkz1yVt for ; Mon, 7 Aug 2023 21:28:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3E50382EA2F for ; Mon, 7 Aug 2023 11:28:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3E50382EA2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407713; bh=k3Hp+uVpiMUWmxixIZOQgw+MNqVNfkGSDD3t+3n7Fn4=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=pAdKTz23Dm4bUDStOWza7f/3ehxSp+HQN0vlG0oibu9U42gpK+vlWv5YrIE+KIiwi ShpUH+62do2XaFEYwxYAipFCAFbYx5boCVGmxNGOjiUlFSNEYFf7a/I78v6nhUQDuL ClSAJYMZHPR6FuGL6TkZQyUIcYoId5eBUpTt0vBc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id A5D413857704 for ; Mon, 7 Aug 2023 11:19:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A5D413857704 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RKDNj6Hdzz9sZD; Mon, 7 Aug 2023 13:19:17 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Vladimir Mezentsev Subject: [PATCH 10/24] gprofng: a new GNU profiler Date: Mon, 7 Aug 2023 12:32:52 +0200 Message-ID: <20230807105935.2098236-11-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Vladimir Mezentsev ChangeLog: * Makefile.def: Add gprofng module. * configure.ac: Add --enable-gprofng option. * Makefile.in: Regenerate. * configure: Regenerate. include/ChangeLog: * collectorAPI.h: New file. * libcollector.h: New file. * libfcollector.h: New file. --- Makefile.def | 11 + Makefile.in | 497 ++++++++++++++++++++++++++++++++++++++++ configure | 18 ++ configure.ac | 14 ++ include/collectorAPI.h | 73 ++++++ include/libcollector.h | 89 +++++++ include/libfcollector.h | 42 ++++ 7 files changed, 744 insertions(+) create mode 100644 include/collectorAPI.h create mode 100644 include/libcollector.h create mode 100644 include/libfcollector.h diff --git a/Makefile.def b/Makefile.def index 9b4a8a2bf7a..86d25f43762 100644 --- a/Makefile.def +++ b/Makefile.def @@ -73,6 +73,7 @@ host_modules= { module= isl; lib_path=.libs; bootstrap=true; no_install= true; }; host_modules= { module= gold; bootstrap=true; }; host_modules= { module= gprof; }; +host_modules= { module= gprofng; }; // intl acts on 'host_shared' directly, and does not support --with-pic. host_modules= { module= intl; bootstrap=true; }; host_modules= { module= tcl; @@ -511,6 +512,16 @@ dependencies = { module=all-gprof; on=all-bfd; }; dependencies = { module=all-gprof; on=all-opcodes; }; dependencies = { module=all-gprof; on=all-intl; }; dependencies = { module=all-gprof; on=all-gas; }; + +dependencies = { module=configure-gprofng; on=configure-intl; }; +dependencies = { module=all-gprofng; on=all-libiberty; }; +dependencies = { module=all-gprofng; on=all-bfd; }; +dependencies = { module=all-gprofng; on=all-opcodes; }; +dependencies = { module=all-gprofng; on=all-intl; }; +dependencies = { module=all-gprofng; on=all-gas; }; +dependencies = { module=install-gprofng; on=install-opcodes; }; +dependencies = { module=install-gprofng; on=install-bfd; }; + dependencies = { module=configure-ld; on=configure-intl; }; dependencies = { module=all-ld; on=all-libiberty; }; dependencies = { module=all-ld; on=all-bfd; }; diff --git a/Makefile.in b/Makefile.in index 6539fb201dc..f177ce176fb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1089,6 +1089,7 @@ configure-host: \ maybe-configure-isl \ maybe-configure-gold \ maybe-configure-gprof \ + maybe-configure-gprofng \ maybe-configure-intl \ maybe-configure-tcl \ maybe-configure-itcl \ @@ -1242,6 +1243,7 @@ all-host: maybe-all-isl all-host: maybe-all-gold @endif gold-no-bootstrap all-host: maybe-all-gprof +all-host: maybe-all-gprofng @if intl-no-bootstrap all-host: maybe-all-intl @endif intl-no-bootstrap @@ -1381,6 +1383,7 @@ info-host: maybe-info-mpc info-host: maybe-info-isl info-host: maybe-info-gold info-host: maybe-info-gprof +info-host: maybe-info-gprofng info-host: maybe-info-intl info-host: maybe-info-tcl info-host: maybe-info-itcl @@ -1471,6 +1474,7 @@ dvi-host: maybe-dvi-mpc dvi-host: maybe-dvi-isl dvi-host: maybe-dvi-gold dvi-host: maybe-dvi-gprof +dvi-host: maybe-dvi-gprofng dvi-host: maybe-dvi-intl dvi-host: maybe-dvi-tcl dvi-host: maybe-dvi-itcl @@ -1561,6 +1565,7 @@ pdf-host: maybe-pdf-mpc pdf-host: maybe-pdf-isl pdf-host: maybe-pdf-gold pdf-host: maybe-pdf-gprof +pdf-host: maybe-pdf-gprofng pdf-host: maybe-pdf-intl pdf-host: maybe-pdf-tcl pdf-host: maybe-pdf-itcl @@ -1651,6 +1656,7 @@ html-host: maybe-html-mpc html-host: maybe-html-isl html-host: maybe-html-gold html-host: maybe-html-gprof +html-host: maybe-html-gprofng html-host: maybe-html-intl html-host: maybe-html-tcl html-host: maybe-html-itcl @@ -1741,6 +1747,7 @@ TAGS-host: maybe-TAGS-mpc TAGS-host: maybe-TAGS-isl TAGS-host: maybe-TAGS-gold TAGS-host: maybe-TAGS-gprof +TAGS-host: maybe-TAGS-gprofng TAGS-host: maybe-TAGS-intl TAGS-host: maybe-TAGS-tcl TAGS-host: maybe-TAGS-itcl @@ -1831,6 +1838,7 @@ install-info-host: maybe-install-info-mpc install-info-host: maybe-install-info-isl install-info-host: maybe-install-info-gold install-info-host: maybe-install-info-gprof +install-info-host: maybe-install-info-gprofng install-info-host: maybe-install-info-intl install-info-host: maybe-install-info-tcl install-info-host: maybe-install-info-itcl @@ -1921,6 +1929,7 @@ install-dvi-host: maybe-install-dvi-mpc install-dvi-host: maybe-install-dvi-isl install-dvi-host: maybe-install-dvi-gold install-dvi-host: maybe-install-dvi-gprof +install-dvi-host: maybe-install-dvi-gprofng install-dvi-host: maybe-install-dvi-intl install-dvi-host: maybe-install-dvi-tcl install-dvi-host: maybe-install-dvi-itcl @@ -2011,6 +2020,7 @@ install-pdf-host: maybe-install-pdf-mpc install-pdf-host: maybe-install-pdf-isl install-pdf-host: maybe-install-pdf-gold install-pdf-host: maybe-install-pdf-gprof +install-pdf-host: maybe-install-pdf-gprofng install-pdf-host: maybe-install-pdf-intl install-pdf-host: maybe-install-pdf-tcl install-pdf-host: maybe-install-pdf-itcl @@ -2101,6 +2111,7 @@ install-html-host: maybe-install-html-mpc install-html-host: maybe-install-html-isl install-html-host: maybe-install-html-gold install-html-host: maybe-install-html-gprof +install-html-host: maybe-install-html-gprofng install-html-host: maybe-install-html-intl install-html-host: maybe-install-html-tcl install-html-host: maybe-install-html-itcl @@ -2191,6 +2202,7 @@ installcheck-host: maybe-installcheck-mpc installcheck-host: maybe-installcheck-isl installcheck-host: maybe-installcheck-gold installcheck-host: maybe-installcheck-gprof +installcheck-host: maybe-installcheck-gprofng installcheck-host: maybe-installcheck-intl installcheck-host: maybe-installcheck-tcl installcheck-host: maybe-installcheck-itcl @@ -2281,6 +2293,7 @@ mostlyclean-host: maybe-mostlyclean-mpc mostlyclean-host: maybe-mostlyclean-isl mostlyclean-host: maybe-mostlyclean-gold mostlyclean-host: maybe-mostlyclean-gprof +mostlyclean-host: maybe-mostlyclean-gprofng mostlyclean-host: maybe-mostlyclean-intl mostlyclean-host: maybe-mostlyclean-tcl mostlyclean-host: maybe-mostlyclean-itcl @@ -2371,6 +2384,7 @@ clean-host: maybe-clean-mpc clean-host: maybe-clean-isl clean-host: maybe-clean-gold clean-host: maybe-clean-gprof +clean-host: maybe-clean-gprofng clean-host: maybe-clean-intl clean-host: maybe-clean-tcl clean-host: maybe-clean-itcl @@ -2461,6 +2475,7 @@ distclean-host: maybe-distclean-mpc distclean-host: maybe-distclean-isl distclean-host: maybe-distclean-gold distclean-host: maybe-distclean-gprof +distclean-host: maybe-distclean-gprofng distclean-host: maybe-distclean-intl distclean-host: maybe-distclean-tcl distclean-host: maybe-distclean-itcl @@ -2551,6 +2566,7 @@ maintainer-clean-host: maybe-maintainer-clean-mpc maintainer-clean-host: maybe-maintainer-clean-isl maintainer-clean-host: maybe-maintainer-clean-gold maintainer-clean-host: maybe-maintainer-clean-gprof +maintainer-clean-host: maybe-maintainer-clean-gprofng maintainer-clean-host: maybe-maintainer-clean-intl maintainer-clean-host: maybe-maintainer-clean-tcl maintainer-clean-host: maybe-maintainer-clean-itcl @@ -2699,6 +2715,7 @@ check-host: \ maybe-check-isl \ maybe-check-gold \ maybe-check-gprof \ + maybe-check-gprofng \ maybe-check-intl \ maybe-check-tcl \ maybe-check-itcl \ @@ -2836,6 +2853,7 @@ install-host-nogcc: \ maybe-install-isl \ maybe-install-gold \ maybe-install-gprof \ + maybe-install-gprofng \ maybe-install-intl \ maybe-install-tcl \ maybe-install-itcl \ @@ -2891,6 +2909,7 @@ install-host: \ maybe-install-isl \ maybe-install-gold \ maybe-install-gprof \ + maybe-install-gprofng \ maybe-install-intl \ maybe-install-tcl \ maybe-install-itcl \ @@ -3001,6 +3020,7 @@ install-strip-host: \ maybe-install-strip-isl \ maybe-install-strip-gold \ maybe-install-strip-gprof \ + maybe-install-strip-gprofng \ maybe-install-strip-intl \ maybe-install-strip-tcl \ maybe-install-strip-itcl \ @@ -19301,6 +19321,474 @@ maintainer-clean-gprof: +.PHONY: configure-gprofng maybe-configure-gprofng +maybe-configure-gprofng: +@if gcc-bootstrap +configure-gprofng: stage_current +@endif gcc-bootstrap +@if gprofng +maybe-configure-gprofng: configure-gprofng +configure-gprofng: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + test ! -f $(HOST_SUBDIR)/gprofng/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gprofng; \ + $(HOST_EXPORTS) \ + echo Configuring in $(HOST_SUBDIR)/gprofng; \ + cd "$(HOST_SUBDIR)/gprofng" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/gprofng/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + module_srcdir=gprofng; \ + $(SHELL) \ + $$s/$$module_srcdir/configure \ + --srcdir=$${topdir}/$$module_srcdir \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} \ + || exit 1 +@endif gprofng + + + + + +.PHONY: all-gprofng maybe-all-gprofng +maybe-all-gprofng: +@if gcc-bootstrap +all-gprofng: stage_current +@endif gcc-bootstrap +@if gprofng +TARGET-gprofng=all +maybe-all-gprofng: all-gprofng +all-gprofng: configure-gprofng + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ + $(TARGET-gprofng)) +@endif gprofng + + + + +.PHONY: check-gprofng maybe-check-gprofng +maybe-check-gprofng: +@if gprofng +maybe-check-gprofng: check-gprofng + +check-gprofng: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(FLAGS_TO_PASS) check) + +@endif gprofng + +.PHONY: install-gprofng maybe-install-gprofng +maybe-install-gprofng: +@if gprofng +maybe-install-gprofng: install-gprofng + +install-gprofng: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(FLAGS_TO_PASS) install) + +@endif gprofng + +.PHONY: install-strip-gprofng maybe-install-strip-gprofng +maybe-install-strip-gprofng: +@if gprofng +maybe-install-strip-gprofng: install-strip-gprofng + +install-strip-gprofng: installdirs + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(FLAGS_TO_PASS) install-strip) + +@endif gprofng + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-gprofng info-gprofng +maybe-info-gprofng: +@if gprofng +maybe-info-gprofng: info-gprofng + +info-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing info in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + info) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-dvi-gprofng dvi-gprofng +maybe-dvi-gprofng: +@if gprofng +maybe-dvi-gprofng: dvi-gprofng + +dvi-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing dvi in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + dvi) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-pdf-gprofng pdf-gprofng +maybe-pdf-gprofng: +@if gprofng +maybe-pdf-gprofng: pdf-gprofng + +pdf-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing pdf in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-html-gprofng html-gprofng +maybe-html-gprofng: +@if gprofng +maybe-html-gprofng: html-gprofng + +html-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing html in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + html) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-TAGS-gprofng TAGS-gprofng +maybe-TAGS-gprofng: +@if gprofng +maybe-TAGS-gprofng: TAGS-gprofng + +TAGS-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing TAGS in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + TAGS) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-info-gprofng install-info-gprofng +maybe-install-info-gprofng: +@if gprofng +maybe-install-info-gprofng: install-info-gprofng + +install-info-gprofng: \ + configure-gprofng \ + info-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-info in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-info) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-dvi-gprofng install-dvi-gprofng +maybe-install-dvi-gprofng: +@if gprofng +maybe-install-dvi-gprofng: install-dvi-gprofng + +install-dvi-gprofng: \ + configure-gprofng \ + dvi-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-dvi in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-dvi) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-pdf-gprofng install-pdf-gprofng +maybe-install-pdf-gprofng: +@if gprofng +maybe-install-pdf-gprofng: install-pdf-gprofng + +install-pdf-gprofng: \ + configure-gprofng \ + pdf-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-pdf in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-pdf) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-install-html-gprofng install-html-gprofng +maybe-install-html-gprofng: +@if gprofng +maybe-install-html-gprofng: install-html-gprofng + +install-html-gprofng: \ + configure-gprofng \ + html-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-html in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-html) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-installcheck-gprofng installcheck-gprofng +maybe-installcheck-gprofng: +@if gprofng +maybe-installcheck-gprofng: installcheck-gprofng + +installcheck-gprofng: \ + configure-gprofng + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing installcheck in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + installcheck) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-mostlyclean-gprofng mostlyclean-gprofng +maybe-mostlyclean-gprofng: +@if gprofng +maybe-mostlyclean-gprofng: mostlyclean-gprofng + +mostlyclean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + mostlyclean) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-clean-gprofng clean-gprofng +maybe-clean-gprofng: +@if gprofng +maybe-clean-gprofng: clean-gprofng + +clean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + clean) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-distclean-gprofng distclean-gprofng +maybe-distclean-gprofng: +@if gprofng +maybe-distclean-gprofng: distclean-gprofng + +distclean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + distclean) \ + || exit 1 + +@endif gprofng + +.PHONY: maybe-maintainer-clean-gprofng maintainer-clean-gprofng +maybe-maintainer-clean-gprofng: +@if gprofng +maybe-maintainer-clean-gprofng: maintainer-clean-gprofng + +maintainer-clean-gprofng: + @: $(MAKE); $(unstage) + @[ -f ./gprofng/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in gprofng"; \ + (cd $(HOST_SUBDIR)/gprofng && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + maintainer-clean) \ + || exit 1 + +@endif gprofng + + + .PHONY: configure-intl maybe-configure-intl maybe-configure-intl: @if gcc-bootstrap @@ -66063,6 +66551,8 @@ all-stagetrain-gas: maybe-all-stagetrain-intl all-stagefeedback-gas: maybe-all-stagefeedback-intl all-stageautoprofile-gas: maybe-all-stageautoprofile-intl all-stageautofeedback-gas: maybe-all-stageautofeedback-intl +install-gprofng: maybe-install-opcodes +install-gprofng: maybe-install-bfd configure-ld: maybe-configure-intl configure-stage1-ld: maybe-configure-stage1-intl configure-stage2-ld: maybe-configure-stage2-intl @@ -66503,6 +66993,7 @@ configure-gdb: stage_last configure-gdbserver: stage_last configure-gdbsupport: stage_last configure-gprof: stage_last +configure-gprofng: stage_last configure-sid: stage_last configure-sim: stage_last configure-fastjar: stage_last @@ -66537,6 +67028,12 @@ all-gprof: maybe-all-bfd all-gprof: maybe-all-opcodes all-gprof: maybe-all-intl all-gprof: maybe-all-gas +configure-gprofng: maybe-configure-intl +all-gprofng: maybe-all-libiberty +all-gprofng: maybe-all-bfd +all-gprofng: maybe-all-opcodes +all-gprofng: maybe-all-intl +all-gprofng: maybe-all-gas all-sid: maybe-all-libiberty all-sid: maybe-all-bfd all-sid: maybe-all-opcodes diff --git a/configure b/configure index c5f6ae8e745..35c0c75ee12 100755 --- a/configure +++ b/configure @@ -806,6 +806,7 @@ enable_offload_targets enable_offload_defaulted enable_gold enable_ld +enable_gprofng enable_compressed_debug_sections enable_default_compressed_debug_sections_algorithm enable_libquadmath @@ -1544,6 +1545,7 @@ Optional Features: --enable-gold[=ARG] build gold [ARG={default,yes,no}] --enable-ld[=ARG] build ld [ARG={default,yes,no}] + --enable-gprofng[=ARG] build gprofng [ARG={yes,no}] --enable-compressed-debug-sections={all,gas,gold,ld,none} Enable compressed debug sections for gas, gold or ld by default @@ -3131,6 +3133,22 @@ $as_echo "$as_me: WARNING: neither ld nor gold are enabled" >&2;} ;; esac +# Check whether --enable-gprofng was given. +if test "${enable_gprofng+set}" = set; then : + enableval=$enable_gprofng; enable_gprofng=$enableval +else + enable_gprofng=yes +fi + +if test "$enable_gprofng" = "yes"; then + case "${target}" in + x86_64-*-linux* | i?86-*-linux* | aarch64-*-linux*) + configdirs="$configdirs gprofng" + ;; + esac +fi + + # PR gas/19109 # Decide the default method for compressing debug sections. # Provide a configure time option to override our default. diff --git a/configure.ac b/configure.ac index ef30300af28..71b923d316f 100644 --- a/configure.ac +++ b/configure.ac @@ -405,6 +405,20 @@ case "${ENABLE_LD}" in ;; esac +AC_ARG_ENABLE(gprofng, +[AS_HELP_STRING([[--enable-gprofng[=ARG]]], + [build gprofng @<:@ARG={yes,no}@:>@])], +enable_gprofng=$enableval, +enable_gprofng=yes) +if test "$enable_gprofng" = "yes"; then + case "${target}" in + x86_64-*-linux* | i?86-*-linux* | aarch64-*-linux*) + configdirs="$configdirs gprofng" + ;; + esac +fi + + # PR gas/19109 # Decide the default method for compressing debug sections. # Provide a configure time option to override our default. diff --git a/include/collectorAPI.h b/include/collectorAPI.h new file mode 100644 index 00000000000..010074a271f --- /dev/null +++ b/include/collectorAPI.h @@ -0,0 +1,73 @@ +/* Copyright (C) 2021-2023 Free Software Foundation, Inc. + Contributed by Oracle. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _COLLECTORAPI_H +#define _COLLECTORAPI_H + +/* This file contains function prototypes for the user-callable API + routines in libcollector. */ + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + /* Routine to record a sample in the experiment. */ + extern void collector_sample (const char *name); + + /* Routine to suspend data collection during an experiment. */ + extern void collector_pause (void); + + /* Routine to resume data collection during an experiment. */ + extern void collector_resume (void); + + /* Routine to suspend per-thread data collection during an experiment. */ + extern void collector_thread_pause (pthread_t tid); + + /* Routine to resume per-thread data collection during an experiment. */ + extern void collector_thread_resume (pthread_t tid); + + /* Routine to close the experiment, and stop all data collection. */ + extern void collector_terminate_expt (void); + + typedef struct + { + unsigned int offset; + unsigned int lineno; + } Lineno; + + /* Routines to let libcollector know about dynamically loaded functions. */ + extern void collector_func_load (const char *name, const char *alias, + const char *sourcename, void *vaddr, + int size, int lntsize, Lineno *lntable); + + extern void collector_func_unload (void *vaddr); + +#ifdef NEED_COLLECTOR_MODULE + extern void collector_module_load (const char *modulename, void *vaddr); + extern void collector_module_unload (void *vaddr); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _COLLECTORAPI_H */ diff --git a/include/libcollector.h b/include/libcollector.h new file mode 100644 index 00000000000..e1c2a440b2a --- /dev/null +++ b/include/libcollector.h @@ -0,0 +1,89 @@ +/* Copyright (C) 2021-2023 Free Software Foundation, Inc. + Contributed by Oracle. + + This file is part of GNU Binutils. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#ifndef _LIBCOLLECTOR_H +#define _LIBCOLLECTOR_H + +typedef struct +{ + unsigned int offset; + unsigned int lineno; +} Lineno; + +#ifdef __cplusplus +extern "C" +{ +#endif + + /* This file contains function prototypes for the user-callable API + routines in libcollector for C and C++ codes. */ + + /* Routine to record a sample in the experiment. */ + void collector_sample (char *name); + + /* Routine to suspend data collection during an experiment. */ + void collector_pause (void); + + /* Routine to resume data collection during an experiment. */ + void collector_resume (void); + + /* Routine to suspend per-thread data collection during an experiment. */ + void collector_thread_pause (unsigned int tid); + + /* Routine to resume per-thread data collection during an experiment. */ + void collector_thread_resume (unsigned int tid); + + /* Routine to close the experiment, and stop all data collection. */ + void collector_terminate_expt (void); + + /* Routines to let libcollector know about a dynamically loaded function. */ + void collector_func_load (char *name, char *alias, char *sourcename, + void *vaddr, int size, int lntsize, Lineno *lntable); + void collector_func_unload (void *vaddr); + + /* Define the weak symbols for the API. */ + void collector_sample () __attribute__ ((weak)); + void collector_pause () __attribute__ ((weak)); + void collector_resume () __attribute__ ((weak)); + void collector_thread_pause () __attribute__ ((weak)); + void collector_thread_resume () __attribute__ ((weak)); + void collector_terminate_expt () __attribute__ ((weak)); + void collector_func_load () __attribute__ ((weak)); + void collector_func_unload () __attribute__ ((weak)); + +#ifdef __cplusplus +} +#endif + +/* Define the macros that actually get inserted in the caller's code. */ +#define collector_sample(x) (collector_sample ? collector_sample(x), 0 : 0) +#define collector_pause() (collector_pause ? collector_pause(), 0 : 0) +#define collector_resume() (collector_resume ? collector_resume(),0 : 0 +#define collector_thread_pause(tid) \ + (collector_thread_pause ? collector_thread_pause(tid), 0 : 0) +#define collector_thread_resume(tid) \ + (collector_thread_resume ? collector_thread_resume(tid), 0 : 0) +#define collector_terminate_expt() \ + (collector_terminate_expt ? collector_terminate_expt(), 0 : 0) +#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \ + collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6), 0 : 0) +#define collector_func_unload(x) \ + (collector_func_unload ? collector_func_unload(x), 0 : 0) +#endif /* _LIBCOLLECTOR_H */ diff --git a/include/libfcollector.h b/include/libfcollector.h new file mode 100644 index 00000000000..1dc6b144e6c --- /dev/null +++ b/include/libfcollector.h @@ -0,0 +1,42 @@ +! Copyright (C) 2021-2023 Free Software Foundation, Inc. +! Contributed by Oracle. +! +! This file is part of GNU Binutils. +! +! This program is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Public License as published by +! the Free Software Foundation; either version 3, or (at your option) +! any later version. +! +! This program is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU General Public License for more details. +! +! You should have received a copy of the GNU General Public License +! along with this program; if not, write to the Free Software +! Foundation, 51 Franklin Street - Fifth Floor, Boston, +! MA 02110-1301, USA. +! +! Developer Sampling Collector interface include file + + interface + + ! Routine to record a sample in the experiment. + subroutine collector_sample(name) + character(len=*), intent(in) :: name + end subroutine + + ! Routine to suspend data collection during an experiment. + subroutine collector_pause() + end subroutine + + ! Routine to resume data collection during an experiment. + subroutine collector_resume() + end subroutine + + ! Routine to stop all data collection and close the experiment. + subroutine collector_terminate_expt() + end subroutine + + end interface From patchwork Mon Aug 7 10:32:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=qmw+t2Sd; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDRt3c5Nz1yYC for ; Mon, 7 Aug 2023 21:22:02 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1A353382BC3C for ; Mon, 7 Aug 2023 11:22:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A353382BC3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407320; bh=1OQ6VaJ3jUexPPXXTrfVpfXRw7I3rK/xbpEEfhaSbe8=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=qmw+t2SdmXJHtFWpdbsjaKMu+m3u5Nhi/Z6W5ykq6Rx0bssNTe/CScBWwcF+RjO3L V++1j0Xda6ib8hUrUB70EDT6/G8TFh8RSJ4KbLxRFLvexuTSR1D0RcppSW6H3VAssw 24Ys0iiOYdnj25W/3MESBXdQFBxUHDndgwPy4KJc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id AEF703857341 for ; Mon, 7 Aug 2023 11:19:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEF703857341 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RKDNl0K1fz9snG; Mon, 7 Aug 2023 13:19:19 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Luis Machado Subject: [PATCH 11/24] Disable year 2038 support on 32-bit hosts by default Date: Mon, 7 Aug 2023 12:32:53 +0200 Message-ID: <20230807105935.2098236-12-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNl0K1fz9snG X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Luis Machado With a recent import of gnulib, code has been pulled that tests and enables 64-bit time_t by default on 32-bit hosts that support it. Although gdb can use the gnulib support, bfd doesn't use gnulib and currently doesn't do these checks. As a consequence, if we have a 32-bit host that supports 64-bit time_t, we'll have a mismatch between gdb's notion of time_t and bfd's notion of time_t. This will lead to mismatches in the struct stat size, leading to memory corruption and crashes. This patch disables the year 2038 check for now, which makes things work reliably again. I'd consider this a temporary fix until we have proper bfd checks for the year 2038, if it makes sense. 64-bit hosts seems to be more common these days, so I'm not sure how important it is to have this support enabled and how soon we want to enable it. Thoughts? ChangeLog: * configure.ac: Disable year2038 by default on 32-bit hosts. * configure: Regenerate. --- configure | 22 ++++++++++++++++++++++ configure.ac | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/configure b/configure index 35c0c75ee12..faa1aedaa04 100755 --- a/configure +++ b/configure @@ -809,6 +809,7 @@ enable_ld enable_gprofng enable_compressed_debug_sections enable_default_compressed_debug_sections_algorithm +enable_year2038 enable_libquadmath enable_libquadmath_support enable_libada @@ -1552,6 +1553,7 @@ Optional Features: --enable-default-compressed-debug-sections-algorithm={zlib,zstd} Default compression algorithm for --enable-compressed-debug-sections. + --enable-year2038 enable support for timestamps past the year 2038 --disable-libquadmath do not build libquadmath directory --disable-libquadmath-support disable libquadmath support for Fortran @@ -3194,6 +3196,20 @@ case "${host}" in ;; esac +# Default to --disable-year2038 until we can handle differences between +# projects that use gnulib (which understands year 2038) and projects that +# do not (like BFD). +# Check whether --enable-year2038 was given. +if test "${enable_year2038+set}" = set; then : + enableval=$enable_year2038; ENABLE_YEAR2038=$enableval +else + ENABLE_YEAR2038=no +fi + +enable_year2038= +if test "${ENABLE_YEAR2038}" = "no" ; then + enable_year2038=no +fi # Check whether --enable-libquadmath was given. if test "${enable_libquadmath+set}" = set; then : @@ -10215,9 +10231,15 @@ if test "$silent" = yes; then baseargs="$baseargs --silent" tbaseargs="$tbaseargs --silent" fi + baseargs="$baseargs --disable-option-checking" tbaseargs="$tbaseargs --disable-option-checking" +if test "$enable_year2038" = no; then + baseargs="$baseargs --disable-year2038" + tbaseargs="$tbaseargs --disable-year2038" +fi + # Record and document user additions to sub configure arguments. diff --git a/configure.ac b/configure.ac index 71b923d316f..a0dff0ecac8 100644 --- a/configure.ac +++ b/configure.ac @@ -459,6 +459,18 @@ case "${host}" in ;; esac +# Default to --disable-year2038 until we can handle differences between +# projects that use gnulib (which understands year 2038) and projects that +# do not (like BFD). +AC_ARG_ENABLE(year2038, +AS_HELP_STRING([--enable-year2038], + [enable support for timestamps past the year 2038]), +ENABLE_YEAR2038=$enableval, +ENABLE_YEAR2038=no) +enable_year2038= +if test "${ENABLE_YEAR2038}" = "no" ; then + enable_year2038=no +fi AC_ARG_ENABLE(libquadmath, AS_HELP_STRING([--disable-libquadmath], @@ -3339,9 +3351,15 @@ if test "$silent" = yes; then baseargs="$baseargs --silent" tbaseargs="$tbaseargs --silent" fi + baseargs="$baseargs --disable-option-checking" tbaseargs="$tbaseargs --disable-option-checking" +if test "$enable_year2038" = no; then + baseargs="$baseargs --disable-year2038" + tbaseargs="$tbaseargs --disable-year2038" +fi + # Record and document user additions to sub configure arguments. AC_ARG_VAR([build_configargs], [additional configure arguments for build directories]) From patchwork Mon Aug 7 10:32:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=UsudhxIt; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDWC212wz1yYC for ; Mon, 7 Aug 2023 21:24:55 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 311B339502CB for ; Mon, 7 Aug 2023 11:24:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 311B339502CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407493; bh=vJTN+PYio+DW+Cfoqjxve9gngJ/RyOVIi1zg6Wsf2w0=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=UsudhxItTu0PlnoHXf+Y9dVhNUSwUTps5ape9vZ8ptohhQtqbJ+87xjZXFz8sKHPU 0WS8sY8jV9qkCoHjQ5ADCFm1sDy3xDAQ/r1sQNyXcLrimtnW92jbdR9fztlJPrEFWs +Blqcs3kSPMAI8XdZdc8x8Ehz9z+sJoohM/MBDEk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by sourceware.org (Postfix) with ESMTPS id 9B1803857B8E for ; Mon, 7 Aug 2023 11:19:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B1803857B8E Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDNn0RXMz9snx; Mon, 7 Aug 2023 13:19:21 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Simon Marchi Subject: [PATCH 12/24] Pass PKG_CONFIG_PATH down from top-level Makefile Date: Mon, 7 Aug 2023 12:32:54 +0200 Message-ID: <20230807105935.2098236-13-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNn0RXMz9snx X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Simon Marchi [Sending to binutils, gdb-patches and gcc-patches, since it touches the top-level Makefile/configure] I have my debuginfod library installed in a non-standard location (/opt/debuginfod), which requires me to set PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config. If I just set it during configure: $ PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config ./configure --with-debuginfod $ make or $ ./configure --with-debuginfod PKG_CONFIG_PATH=/opt/debuginfod/lib/pkg-config $ make Then PKG_CONFIG_PATH is only present (and ignored) during the top-level configure. When running make (which runs gdb's and binutils' configure), PKG_CONFIG_PATH is not set, which results in their configure script not finding the library: checking for libdebuginfod >= 0.179... no configure: error: "--with-debuginfod was given, but libdebuginfod is missing or unusable." Change the top-level configure/Makefile system to capture the value passed when configuring the top-level and pass it down to subdirectories (similar to CFLAGS, LDFLAGS, etc). I don't know much about the top-level build system, so I really don't know if I did this correctly. The changes are: - Use AC_SUBST(PKG_CONFIG_PATH) in configure.ac, so that @PKG_CONFIG_PATH@ gets replaced with the actual PKG_CONFIG_PATH value in config files (i.e. Makefile) - Add a PKG_CONFIG_PATH Makefile variable in Makefile.tpl, initialized to @PKG_CONFIG_PATH@ - Add PKG_CONFIG_PATH to HOST_EXPORTS in Makefile.tpl, which are the variables set when running the sub-configures I initially added PKG_CONFIG_PATH to flags_to_pass, in Makefile.def, but I don't think it's needed. AFAIU, this defines the flags to pass down when calling "make" in subdirectories. We only need PKG_CONFIG_PATH to be passed down during configure. After that, it's captured in gdb/config.status, so even if a "make" causes a re-configure later (because gdb/configure has changed, for example), the PKG_CONFIG_PATH value will be remembered. Change-Id: I91138dfca41c43b05e53e445f62e4b27882536bf ChangeLog: * configure.ac: Add AC_SUBST(PKG_CONFIG_PATH). * configure: Re-generate. * Makefile.tpl (HOST_EXPORTS): Pass PKG_CONFIG_PATH. (PKG_CONFIG_PATH): New. * Makefile.in: Re-generate. --- Makefile.in | 3 +++ Makefile.tpl | 3 +++ configure | 2 ++ configure.ac | 1 + 4 files changed, 9 insertions(+) diff --git a/Makefile.in b/Makefile.in index f177ce176fb..214a2a15544 100644 --- a/Makefile.in +++ b/Makefile.in @@ -221,6 +221,7 @@ HOST_EXPORTS = \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ OTOOL="$(OTOOL)"; export OTOOL; \ + PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"; export PKG_CONFIG_PATH; \ READELF="$(READELF)"; export READELF; \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ @@ -447,6 +448,8 @@ GOCFLAGS = $(CFLAGS) GDCFLAGS = @GDCFLAGS@ GM2FLAGS = $(CFLAGS) +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + # Pass additional PGO and LTO compiler options to the PGO build. BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS) override CFLAGS += $(BUILD_CFLAGS) diff --git a/Makefile.tpl b/Makefile.tpl index 6586e907964..36fa20950d4 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -224,6 +224,7 @@ HOST_EXPORTS = \ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \ OTOOL="$(OTOOL)"; export OTOOL; \ + PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"; export PKG_CONFIG_PATH; \ READELF="$(READELF)"; export READELF; \ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \ @@ -450,6 +451,8 @@ GOCFLAGS = $(CFLAGS) GDCFLAGS = @GDCFLAGS@ GM2FLAGS = $(CFLAGS) +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + # Pass additional PGO and LTO compiler options to the PGO build. BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS) override CFLAGS += $(BUILD_CFLAGS) diff --git a/configure b/configure index faa1aedaa04..b6b7487f834 100755 --- a/configure +++ b/configure @@ -622,6 +622,7 @@ CXX_FOR_TARGET CC_FOR_TARGET RANLIB_PLUGIN_OPTION AR_PLUGIN_OPTION +PKG_CONFIG_PATH GDCFLAGS READELF OTOOL @@ -13017,6 +13018,7 @@ fi GDCFLAGS=${GDCFLAGS-${CFLAGS}} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 $as_echo_n "checking for -plugin option... " >&6; } diff --git a/configure.ac b/configure.ac index a0dff0ecac8..39e5649f360 100644 --- a/configure.ac +++ b/configure.ac @@ -3708,6 +3708,7 @@ AC_SUBST(CXXFLAGS) AC_SUBST(GDC) AC_SUBST(GDCFLAGS) GDCFLAGS=${GDCFLAGS-${CFLAGS}} +AC_SUBST(PKG_CONFIG_PATH) GCC_PLUGIN_OPTION(PLUGIN_OPTION) AR_PLUGIN_OPTION= From patchwork Mon Aug 7 10:32:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817867 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=JRtRLliV; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDcX6w7dz1yVt for ; Mon, 7 Aug 2023 21:29:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD66A38AA279 for ; Mon, 7 Aug 2023 11:29:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD66A38AA279 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407770; bh=RQlAgTnVnQPtKaBdlnyPB5NKzLeJ/myV94WisJvhT/Y=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=JRtRLliVXzZv1jdrAcQ7IWS9RQa/LFLHOcs6HPNchNvp3hieWTomEnyrSEKwyy2tj q2nMdS5J1n7hFWYS6f0o+SP7nCOnIFR3D5a33amPglEE/FV5XVZMLZPGTzImTjjDfX c4+3YFzJw/4TGEBFcoJeocMqTQxoAKoR4YTeUNZ4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id B88E63858024 for ; Mon, 7 Aug 2023 11:19:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B88E63858024 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RKDNp10VXz9sn2; Mon, 7 Aug 2023 13:19:22 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Arsen_Arsenovi=C4=87?= Subject: [PATCH 13/24] configure: reinstate 32b PA-RISC HP-UX target in toplevel Date: Mon, 7 Aug 2023 12:32:55 +0200 Message-ID: <20230807105935.2098236-14-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNp10VXz9sn2 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" The Binutils still support this target. ChangeLog: * configure.ac: Reinstate 32b PA-RISC HP-UX targets * configure: Regenerate. --- configure | 10 ++++++++++ configure.ac | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/configure b/configure index b6b7487f834..907ebe71777 100755 --- a/configure +++ b/configure @@ -3572,6 +3572,11 @@ case "${target}" in hppa*64*-*-hpux*) noconfigdirs="$noconfigdirs target-libffi" ;; + hppa*-hp-hpux11*) + ;; + hppa*-*-hpux*) + noconfigdirs="$noconfigdirs target-libffi" + ;; ia64*-*-*vms*) noconfigdirs="$noconfigdirs target-libffi" ;; @@ -3878,9 +3883,14 @@ case "${target}" in h8500-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; + hppa1.1-*-osf* | hppa1.1-*-bsd* ) + ;; hppa*64*-*-hpux*) noconfigdirs="$noconfigdirs gdb" ;; + hppa*-*-hpux11*) + noconfigdirs="$noconfigdirs gdb ld" + ;; hppa*64*-*-linux*) ;; hppa*-*-linux*) diff --git a/configure.ac b/configure.ac index 39e5649f360..6a2e585a39a 100644 --- a/configure.ac +++ b/configure.ac @@ -802,6 +802,11 @@ case "${target}" in hppa*64*-*-hpux*) noconfigdirs="$noconfigdirs target-libffi" ;; + hppa*-hp-hpux11*) + ;; + hppa*-*-hpux*) + noconfigdirs="$noconfigdirs target-libffi" + ;; ia64*-*-*vms*) noconfigdirs="$noconfigdirs target-libffi" ;; @@ -1105,9 +1110,14 @@ case "${target}" in h8500-*-*) noconfigdirs="$noconfigdirs target-libgloss" ;; + hppa1.1-*-osf* | hppa1.1-*-bsd* ) + ;; hppa*64*-*-hpux*) noconfigdirs="$noconfigdirs gdb" ;; + hppa*-*-hpux11*) + noconfigdirs="$noconfigdirs gdb ld" + ;; hppa*64*-*-linux*) ;; hppa*-*-linux*) From patchwork Mon Aug 7 10:32:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=ZXMDumzI; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDfw0CW5z1ybZ for ; Mon, 7 Aug 2023 21:31:36 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D0F9F394D89B for ; Mon, 7 Aug 2023 11:31:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0F9F394D89B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407893; bh=RozeVRWC8iDQ9ACWb+YPo4AL8OAAqB+TWtRgf3SL0sA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ZXMDumzICg2AnEhSCDB+zVfmXNsAvwzja8B3DPCxznn7oaORkwtxkCCbS/2VJ792u 8ouIupVVG5WQjlDo9LYsqrq4abko02O/Q2UcKBimrV44cwU3FxKJPO4cnNtaNCHNzH P0bZpD9IszZGDOXrCEYm/a5UqVfg53f2WCc5kSzw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by sourceware.org (Postfix) with ESMTPS id 1CF7D3857709 for ; Mon, 7 Aug 2023 11:19:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1CF7D3857709 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4RKDNq3xpqz9sS2; Mon, 7 Aug 2023 13:19:23 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Nick Alcock Subject: [PATCH 14/24] libtool.m4: fix nm BSD flag detection Date: Mon, 7 Aug 2023 12:32:56 +0200 Message-ID: <20230807105935.2098236-15-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SCC_10_SHORT_WORD_LINES, SCC_20_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Nick Alcock Libtool needs to get BSD-format (or MS-format) output out of the system nm, so that it can scan generated object files for symbol names for -export-symbols-regex support. Some nms need specific flags to turn on BSD-formatted output, so libtool checks for this in its AC_PATH_NM. Unfortunately the code to do this has a pair of interlocking flaws: - it runs the test by doing an nm of /dev/null. Some platforms reasonably refuse to do an nm on a device file, but before now this has only been worked around by assuming that the error message has a specific textual form emitted by Tru64 nm, and that getting this error means this is Tru64 nm and that nm -B would work to produce BSD-format output, even though the test never actually got anything but an error message out of nm -B. This is fixable by nm'ing *nm itself* (since we necessarily have a path to it). - the test is entirely skipped if NM is set in the environment, on the grounds that the user has overridden the test: but the user cannot reasonably be expected to know that libtool wants not only nm but also flags forcing BSD-format output. Worse yet, one such "user" is the top-level Cygnus configure script, which neither tests for nor specifies any BSD-format flags. So platforms needing BSD-format flags always fail to set them when run in a Cygnus tree, breaking -export-symbols-regex on such platforms. Libtool also needs to augment $LD on some platforms, but this is done unconditionally, augmenting whatever the user specified: the nm check should do the same. One wrinkle: if the user has overridden $NM, a path might have been provided: so we use the user-specified path if there was one, and otherwise do the path search as usual. (If the nm specified doesn't work, this might lead to a few extra pointless path searches -- but the test is going to fail anyway, so that's not a problem.) (Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where *that* is a symlink to /usr/bin/nm.) ChangeLog: * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided NM, if there is one. Run nm on itself, not on /dev/null, to avoid errors from nms that refuse to work on non-regular files. Remove other workarounds for this problem. Strip out blank lines from the nm output. fixincludes/ChangeLog: * configure: Regenerate. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate. --- fixincludes/configure | 3 +- gcc/configure | 89 ++++++++++++++++++------------------ libatomic/configure | 89 ++++++++++++++++++------------------ libbacktrace/configure | 89 ++++++++++++++++++------------------ libcc1/configure | 89 ++++++++++++++++++------------------ libffi/configure | 89 ++++++++++++++++++------------------ libgfortran/configure | 89 ++++++++++++++++++------------------ libgm2/configure | 89 ++++++++++++++++++------------------ libgomp/configure | 89 ++++++++++++++++++------------------ libitm/configure | 89 ++++++++++++++++++------------------ libobjc/configure | 89 ++++++++++++++++++------------------ libphobos/configure | 89 ++++++++++++++++++------------------ libquadmath/configure | 89 ++++++++++++++++++------------------ libsanitizer/configure | 89 ++++++++++++++++++------------------ libssp/configure | 89 ++++++++++++++++++------------------ libstdc++-v3/configure | 101 +++++++++++++++++++++-------------------- libtool.m4 | 88 +++++++++++++++++------------------ libvtv/configure | 89 ++++++++++++++++++------------------ lto-plugin/configure | 89 ++++++++++++++++++------------------ zlib/configure | 89 ++++++++++++++++++------------------ 20 files changed, 863 insertions(+), 842 deletions(-) diff --git a/fixincludes/configure b/fixincludes/configure index f1748ebef74..b9770489adc 100755 --- a/fixincludes/configure +++ b/fixincludes/configure @@ -2941,7 +2941,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # LT_PATH_NM # ---------- -# find the pathname to a BSD- or MS-compatible name lister +# find the pathname to a BSD- or MS-compatible name lister, and any flags +# needed to make it compatible # LT_PATH_NM # Old names: diff --git a/gcc/configure b/gcc/configure index 55cb24ef453..81b93c1b599 100755 --- a/gcc/configure +++ b/gcc/configure @@ -14136,48 +14136,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -19881,7 +19882,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19884 "configure" +#line 19885 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19987,7 +19988,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19990 "configure" +#line 19991 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libatomic/configure b/libatomic/configure index 8e10b70d443..72bd9ae5814 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -5381,48 +5381,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -11395,7 +11396,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11398 "configure" +#line 11399 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11501,7 +11502,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11504 "configure" +#line 11505 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libbacktrace/configure b/libbacktrace/configure index d086b86a088..9264c2b1968 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -5826,48 +5826,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -11572,7 +11573,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11575 "configure" +#line 11576 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11678,7 +11679,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11681 "configure" +#line 11682 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libcc1/configure b/libcc1/configure index 84964de24de..1141b343096 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -5087,48 +5087,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -10832,7 +10833,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10835 "configure" +#line 10836 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10938,7 +10939,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10941 "configure" +#line 10942 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libffi/configure b/libffi/configure index a1824ceaeb3..0f34914d876 100755 --- a/libffi/configure +++ b/libffi/configure @@ -5613,48 +5613,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -11627,7 +11628,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11630 "configure" +#line 11631 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11733,7 +11734,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11736 "configure" +#line 11737 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgfortran/configure b/libgfortran/configure index 425d1e32b39..2cd8cca82e2 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -7015,48 +7015,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12792,7 +12793,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12795 "configure" +#line 12796 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12898,7 +12899,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12901 "configure" +#line 12902 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgm2/configure b/libgm2/configure index d3c3ab06ada..578f85cfc6a 100755 --- a/libgm2/configure +++ b/libgm2/configure @@ -6917,48 +6917,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12695,7 +12696,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12698 "configure" +#line 12699 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12801,7 +12802,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12804 "configure" +#line 12805 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgomp/configure b/libgomp/configure index 49b43ba0967..5a31497cb3b 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -5395,48 +5395,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -11409,7 +11410,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11412 "configure" +#line 11413 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11515,7 +11516,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11518 "configure" +#line 11519 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libitm/configure b/libitm/configure index 6961eb879b3..2e552f48770 100755 --- a/libitm/configure +++ b/libitm/configure @@ -6056,48 +6056,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12071,7 +12072,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12074 "configure" +#line 12075 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12177,7 +12178,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12180 "configure" +#line 12181 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libobjc/configure b/libobjc/configure index cbac20271cf..274f764f7de 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -4744,48 +4744,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -10827,7 +10828,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10830 "configure" +#line 10831 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10933,7 +10934,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10936 "configure" +#line 10937 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libphobos/configure b/libphobos/configure index 7c453f58771..c1126404f28 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -6060,48 +6060,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -11805,7 +11806,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11808 "configure" +#line 11809 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11911,7 +11912,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11914 "configure" +#line 11915 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libquadmath/configure b/libquadmath/configure index 60844f38265..5e4632c557b 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -5082,48 +5082,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -10861,7 +10862,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10864 "configure" +#line 10865 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10967,7 +10968,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10970 "configure" +#line 10971 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libsanitizer/configure b/libsanitizer/configure index 52c6677793e..9826fc3d7eb 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -6669,48 +6669,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12414,7 +12415,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12417 "configure" +#line 12418 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12520,7 +12521,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12523 "configure" +#line 12524 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libssp/configure b/libssp/configure index fdf4e9d234d..9e2de53afa5 100755 --- a/libssp/configure +++ b/libssp/configure @@ -5268,48 +5268,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -11047,7 +11048,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11050 "configure" +#line 11051 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11153,7 +11154,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11156 "configure" +#line 11157 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index b280071391d..d029fa4284c 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -6322,48 +6322,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12218,7 +12219,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12221 "configure" +#line 12222 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12324,7 +12325,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12327 "configure" +#line 12328 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16048,7 +16049,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 16051 "configure" +#line 16052 "configure" int main() { typedef bool atomic_type; @@ -16083,7 +16084,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16086 "configure" +#line 16087 "configure" int main() { typedef short atomic_type; @@ -16118,7 +16119,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16121 "configure" +#line 16122 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -16154,7 +16155,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16157 "configure" +#line 16158 "configure" int main() { typedef long long atomic_type; @@ -16310,7 +16311,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16313 "configure" +#line 16314 "configure" int main() { _Decimal32 d1; @@ -16352,7 +16353,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16355 "configure" +#line 16356 "configure" template struct same { typedef T2 type; }; diff --git a/libtool.m4 b/libtool.m4 index 7af548938ec..b827d21177d 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -3231,53 +3231,55 @@ _LT_DECL([], [file_magic_cmd], [1], # LT_PATH_NM # ---------- -# find the pathname to a BSD- or MS-compatible name lister +# find the pathname to a BSD- or MS-compatible name lister, and any flags +# needed to make it compatible AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no}]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else diff --git a/libvtv/configure b/libvtv/configure index 33ca49e63c6..538b6d110b7 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -6564,48 +6564,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12309,7 +12310,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12312 "configure" +#line 12313 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12415,7 +12416,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12418 "configure" +#line 12419 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/lto-plugin/configure b/lto-plugin/configure index 69ccd66b038..fb4a736a1f8 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -6435,48 +6435,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -12181,7 +12182,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12184 "configure" +#line 12185 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12287,7 +12288,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12290 "configure" +#line 12291 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/zlib/configure b/zlib/configure index 29eeb350429..88ca62f28da 100755 --- a/zlib/configure +++ b/zlib/configure @@ -4748,48 +4748,49 @@ if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi + # Let the user override the nm to test. + lt_nm_to_check="$NM" + else + lt_nm_to_check="${ac_tool_prefix}nm" + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + lt_nm_to_check="$lt_nm_to_check nm" + fi + fi + for lt_tmp_nm in $lt_nm_to_check; do + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + case "$lt_tmp_nm" in + */*|*\\*) tmp_nm="$lt_tmp_nm";; + *) tmp_nm="$ac_dir/$lt_tmp_nm";; + esac + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + *$tmp_nm*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + ;; + esac + fi + done + IFS="$lt_save_ifs" + done + : ${lt_cv_path_NM=no} fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } @@ -10794,7 +10795,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10797 "configure" +#line 10798 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10900,7 +10901,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10903 "configure" +#line 10904 "configure" #include "confdefs.h" #if HAVE_DLFCN_H From patchwork Mon Aug 7 10:32:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817866 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=LXhYfW/7; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDc872Fqz1yVt for ; Mon, 7 Aug 2023 21:29:12 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F17DA383566F for ; Mon, 7 Aug 2023 11:29:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F17DA383566F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407751; bh=ik263+wBFP3tkiEcUiCV8PcQivbdeH1avjUAJBw7ZPA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=LXhYfW/751SoDqZ9QjPlieKUpPDBeOenvj+m8naOukFyYxFae1OnZvbde84Bwhywk Vpnn3UQLIakeBiWSDZEdQmNFy9B1h32jw+46y+oq/klutrXt/tuiADw8baHD8PRdOX +YO1Dkeaw57FHrwx2S9rFmoIGQ8WkE0PSqyZGMIM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 285073857349 for ; Mon, 7 Aug 2023 11:19:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 285073857349 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RKDNr46scz9sd9; Mon, 7 Aug 2023 13:19:24 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Nick Alcock Subject: [PATCH 15/24] libtool.m4: fix the NM="/nm/over/here -B/option/with/path" case Date: Mon, 7 Aug 2023 12:32:57 +0200 Message-ID: <20230807105935.2098236-16-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SCC_10_SHORT_WORD_LINES, SCC_5_SHORT_WORD_LINES, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Nick Alcock My previous nm patch handled all cases but one -- if the user set NM in the environment to a path which contained an option, libtool's nm detection tries to run nm against a copy of nm with the options in it: e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle". This is unlikely to be desirable: in this case we should run "/usr/bin/nm --blargle /usr/bin/nm". Furthermore, as part of this nm has to detect when the passed-in $NM contains a path, and in that case avoid doing a path search itself. This too was thrown off if an option contained something that looked like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run "nm -B../prev-gcc nm" which rarely works well (and indeed it looks to see whether that nm exists, finds it doesn't, and wrongly concludes that nm -p or whatever does not work). Fix all of these by clipping all options (defined as everything including and after the first " -") before deciding whether nm contains a path (but not using the clipped value for anything else), and then removing all options from the path-modified nm before looking to see whether that nm existed. NM=my-nm now does a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM=/usr/bin/my-nm now avoids a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM="my-nm -p../wombat" now does a path search and runs e.g. /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search: ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm This seems to be all combinations, including those used by GCC bootstrap (which, before this commit, fails to bootstrap when configured --with-build-config=bootstrap-lto, because the lto plugin is now using --export-symbols-regex, which requires libtool to find a working nm, while also using -B../prev-gcc to point at the lto plugin associated with the GCC just built.) Regenerate all affected configure scripts. ChangeLog: * libtool.m4 (LT_PATH_NM): Handle user-specified NM with options, including options containing paths. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate. --- gcc/configure | 20 +++++++++++++------- libatomic/configure | 20 +++++++++++++------- libbacktrace/configure | 20 +++++++++++++------- libcc1/configure | 20 +++++++++++++------- libffi/configure | 20 +++++++++++++------- libgfortran/configure | 20 +++++++++++++------- libgm2/configure | 20 +++++++++++++------- libgomp/configure | 20 +++++++++++++------- libitm/configure | 20 +++++++++++++------- libobjc/configure | 20 +++++++++++++------- libphobos/configure | 20 +++++++++++++------- libquadmath/configure | 20 +++++++++++++------- libsanitizer/configure | 20 +++++++++++++------- libssp/configure | 20 +++++++++++++------- libstdc++-v3/configure | 32 +++++++++++++++++++------------- libtool.m4 | 16 +++++++++++----- libvtv/configure | 20 +++++++++++++------- lto-plugin/configure | 20 +++++++++++++------- zlib/configure | 20 +++++++++++++------- 19 files changed, 251 insertions(+), 137 deletions(-) diff --git a/gcc/configure b/gcc/configure index 81b93c1b599..c58a99f5d40 100755 --- a/gcc/configure +++ b/gcc/configure @@ -14144,25 +14144,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -19882,7 +19888,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19885 "configure" +#line 19891 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19988,7 +19994,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19991 "configure" +#line 19997 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libatomic/configure b/libatomic/configure index 72bd9ae5814..648f0dd7e52 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -5389,25 +5389,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -11396,7 +11402,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11399 "configure" +#line 11405 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11502,7 +11508,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11505 "configure" +#line 11511 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libbacktrace/configure b/libbacktrace/configure index 9264c2b1968..73611a3b994 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -5834,25 +5834,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -11573,7 +11579,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11576 "configure" +#line 11582 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11679,7 +11685,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11682 "configure" +#line 11688 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libcc1/configure b/libcc1/configure index 1141b343096..db9f6d6852d 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -5095,25 +5095,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -10833,7 +10839,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10836 "configure" +#line 10842 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10939,7 +10945,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10942 "configure" +#line 10948 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libffi/configure b/libffi/configure index 0f34914d876..d8f58eae0a0 100755 --- a/libffi/configure +++ b/libffi/configure @@ -5621,25 +5621,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -11628,7 +11634,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11631 "configure" +#line 11637 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11734,7 +11740,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11737 "configure" +#line 11743 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgfortran/configure b/libgfortran/configure index 2cd8cca82e2..27434bf4ec6 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -7023,25 +7023,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12793,7 +12799,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12796 "configure" +#line 12802 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12899,7 +12905,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12902 "configure" +#line 12908 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgm2/configure b/libgm2/configure index 578f85cfc6a..bfc613dc19a 100755 --- a/libgm2/configure +++ b/libgm2/configure @@ -6925,25 +6925,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12696,7 +12702,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12699 "configure" +#line 12705 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12802,7 +12808,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12805 "configure" +#line 12811 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgomp/configure b/libgomp/configure index 5a31497cb3b..75c438eaccc 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -5403,25 +5403,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -11410,7 +11416,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11413 "configure" +#line 11419 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11516,7 +11522,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11519 "configure" +#line 11525 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libitm/configure b/libitm/configure index 2e552f48770..8e919417896 100755 --- a/libitm/configure +++ b/libitm/configure @@ -6064,25 +6064,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12072,7 +12078,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12075 "configure" +#line 12081 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12178,7 +12184,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12181 "configure" +#line 12187 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libobjc/configure b/libobjc/configure index 274f764f7de..2598099aa97 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -4752,25 +4752,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -10828,7 +10834,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10831 "configure" +#line 10837 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10934,7 +10940,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10937 "configure" +#line 10943 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libphobos/configure b/libphobos/configure index c1126404f28..7d3c062e97a 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -6068,25 +6068,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -11806,7 +11812,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11809 "configure" +#line 11815 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11912,7 +11918,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11915 "configure" +#line 11921 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libquadmath/configure b/libquadmath/configure index 5e4632c557b..bd0545a164a 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -5090,25 +5090,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -10862,7 +10868,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10865 "configure" +#line 10871 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10968,7 +10974,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10971 "configure" +#line 10977 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libsanitizer/configure b/libsanitizer/configure index 9826fc3d7eb..88f1a3ebfdf 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -6677,25 +6677,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12415,7 +12421,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12418 "configure" +#line 12424 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12521,7 +12527,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12524 "configure" +#line 12530 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libssp/configure b/libssp/configure index 9e2de53afa5..ab356df0ea8 100755 --- a/libssp/configure +++ b/libssp/configure @@ -5276,25 +5276,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -11048,7 +11054,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11051 "configure" +#line 11057 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11154,7 +11160,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11157 "configure" +#line 11163 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index d029fa4284c..634f8595185 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -6330,25 +6330,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12219,7 +12225,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12222 "configure" +#line 12228 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12325,7 +12331,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12328 "configure" +#line 12334 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16049,7 +16055,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 16052 "configure" +#line 16058 "configure" int main() { typedef bool atomic_type; @@ -16084,7 +16090,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16087 "configure" +#line 16093 "configure" int main() { typedef short atomic_type; @@ -16119,7 +16125,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16122 "configure" +#line 16128 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -16155,7 +16161,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16158 "configure" +#line 16164 "configure" int main() { typedef long long atomic_type; @@ -16311,7 +16317,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16314 "configure" +#line 16320 "configure" int main() { _Decimal32 d1; @@ -16353,7 +16359,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16356 "configure" +#line 16362 "configure" template struct same { typedef T2 type; }; diff --git a/libtool.m4 b/libtool.m4 index b827d21177d..79f9a7f3957 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -3245,25 +3245,31 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break diff --git a/libvtv/configure b/libvtv/configure index 538b6d110b7..03656cba8e7 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -6572,25 +6572,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12310,7 +12316,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12313 "configure" +#line 12319 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12416,7 +12422,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12419 "configure" +#line 12425 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/lto-plugin/configure b/lto-plugin/configure index fb4a736a1f8..34891ebb7f2 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -6443,25 +6443,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -12182,7 +12188,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12185 "configure" +#line 12191 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12288,7 +12294,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12291 "configure" +#line 12297 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/zlib/configure b/zlib/configure index 88ca62f28da..db58625c89a 100755 --- a/zlib/configure +++ b/zlib/configure @@ -4756,25 +4756,31 @@ else lt_nm_to_check="$lt_nm_to_check nm" fi fi - for lt_tmp_nm in $lt_nm_to_check; do + for lt_tmp_nm in "$lt_nm_to_check"; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - case "$lt_tmp_nm" in + # Strip out any user-provided options from the nm to test twice, + # the first time to test to see if nm (rather than its options) has + # an explicit path, the second time to yield a file which can be + # nm'ed itself. + tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`" + case "$tmp_nm_path" in */*|*\\*) tmp_nm="$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";; esac - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`" + if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B" break ;; *) - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in + case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in *$tmp_nm*) lt_cv_path_NM="$tmp_nm -p" break @@ -10795,7 +10801,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10798 "configure" +#line 10804 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10901,7 +10907,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10904 "configure" +#line 10910 "configure" #include "confdefs.h" #if HAVE_DLFCN_H From patchwork Mon Aug 7 10:32:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817869 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=XsdvfjXb; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDdc4fnxz1yYl for ; Mon, 7 Aug 2023 21:30:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93E3A3995B67 for ; Mon, 7 Aug 2023 11:30:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93E3A3995B67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407826; bh=ams6mBF8laTFlOWfarehRQgAcGpogJI3D/INA1ftvsY=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=XsdvfjXbXhURPNUtZuDpPv5GRE55WUtb8Tk2qIB9vIzEck5UcJnAkzUYKNuRMp/+w o0hAfWTecc8ArQUwfi1baH9VsCGfuXZBg4cxGXf1q+qbQBIC8xldLcOgV7FYpzKiXK HpGv8oreM+nu14CGWIKlge8ZXIEj1my2iPJumPEo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by sourceware.org (Postfix) with ESMTPS id 430D438582B7 for ; Mon, 7 Aug 2023 11:19:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 430D438582B7 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4RKDNs4xw4z9sWF; Mon, 7 Aug 2023 13:19:25 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Alexander von Gluck IV Subject: [PATCH 16/24] Add support for the haiku operating system Date: Mon, 7 Aug 2023 12:32:58 +0200 Message-ID: <20230807105935.2098236-17-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNs4xw4z9sWF X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Alexander von Gluck IV These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time. ChangeLog: * configure: Regenerate. * configure.ac: Add Haiku to list of ELF OSes * libtool.m4: Update sys_lib_dlsearch_path_spec on Haiku. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate. --- configure | 2 +- configure.ac | 2 +- gcc/configure | 4 ++-- libatomic/configure | 2 +- libbacktrace/configure | 2 +- libcc1/configure | 4 ++-- libffi/configure | 4 ++-- libgfortran/configure | 4 ++-- libgm2/configure | 4 ++-- libgomp/configure | 4 ++-- libitm/configure | 4 ++-- libobjc/configure | 2 +- libphobos/configure | 2 +- libquadmath/configure | 2 +- libsanitizer/configure | 4 ++-- libssp/configure | 2 +- libstdc++-v3/configure | 4 ++-- libtool.m4 | 2 +- libvtv/configure | 4 ++-- lto-plugin/configure | 2 +- zlib/configure | 2 +- 21 files changed, 31 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 907ebe71777..28f0913bdd4 100755 --- a/configure +++ b/configure @@ -3077,7 +3077,7 @@ case "${ENABLE_GOLD}" in *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \ - | *-*-solaris2* | *-*-nto* | *-*-nacl*) + | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-haiku*) case "${target}" in *-*-linux*aout* | *-*-linux*oldld*) ;; diff --git a/configure.ac b/configure.ac index 6a2e585a39a..5d25dc864c3 100644 --- a/configure.ac +++ b/configure.ac @@ -349,7 +349,7 @@ case "${ENABLE_GOLD}" in *-*-elf* | *-*-sysv4* | *-*-unixware* | *-*-eabi* | hppa*64*-*-hpux* \ | *-*-linux* | *-*-gnu* | frv-*-uclinux* | *-*-irix5* | *-*-irix6* \ | *-*-netbsd* | *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* \ - | *-*-solaris2* | *-*-nto* | *-*-nacl*) + | *-*-solaris2* | *-*-nto* | *-*-nacl* | *-*-haiku*) case "${target}" in *-*-linux*aout* | *-*-linux*oldld*) ;; diff --git a/gcc/configure b/gcc/configure index c58a99f5d40..e97433d8743 100755 --- a/gcc/configure +++ b/gcc/configure @@ -19068,7 +19068,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -22743,7 +22743,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libatomic/configure b/libatomic/configure index 648f0dd7e52..75096735c61 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -10582,7 +10582,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libbacktrace/configure b/libbacktrace/configure index 73611a3b994..f3ef3fc3f23 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -10759,7 +10759,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libcc1/configure b/libcc1/configure index db9f6d6852d..edf03334f30 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -10019,7 +10019,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -14100,7 +14100,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libffi/configure b/libffi/configure index d8f58eae0a0..a1ded4f617b 100755 --- a/libffi/configure +++ b/libffi/configure @@ -10814,7 +10814,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -14489,7 +14489,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libgfortran/configure b/libgfortran/configure index 27434bf4ec6..7b408515498 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -11961,7 +11961,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -15750,7 +15750,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libgm2/configure b/libgm2/configure index bfc613dc19a..2d54302129c 100755 --- a/libgm2/configure +++ b/libgm2/configure @@ -11864,7 +11864,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -15563,7 +15563,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libgomp/configure b/libgomp/configure index 75c438eaccc..6d4b6e3850e 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -10596,7 +10596,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -14266,7 +14266,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libitm/configure b/libitm/configure index 8e919417896..83ff24b73e8 100755 --- a/libitm/configure +++ b/libitm/configure @@ -11258,7 +11258,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -14933,7 +14933,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libobjc/configure b/libobjc/configure index 2598099aa97..fd590e628ab 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -9996,7 +9996,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libphobos/configure b/libphobos/configure index 7d3c062e97a..814cacc1120 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -10992,7 +10992,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libquadmath/configure b/libquadmath/configure index bd0545a164a..3ddaa5159d9 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -10030,7 +10030,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libsanitizer/configure b/libsanitizer/configure index 88f1a3ebfdf..82c4cf531de 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -11601,7 +11601,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -15276,7 +15276,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libssp/configure b/libssp/configure index ab356df0ea8..413f10fa6a2 100755 --- a/libssp/configure +++ b/libssp/configure @@ -10216,7 +10216,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 634f8595185..7a10779b9ff 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -11387,7 +11387,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -15086,7 +15086,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libtool.m4 b/libtool.m4 index 79f9a7f3957..027d03c4cf1 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -2364,7 +2364,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/libvtv/configure b/libvtv/configure index 03656cba8e7..55d4b698cee 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -11496,7 +11496,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -15171,7 +15171,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/lto-plugin/configure b/lto-plugin/configure index 34891ebb7f2..5473d138d23 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -11368,7 +11368,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; diff --git a/zlib/configure b/zlib/configure index db58625c89a..e224f1c8220 100755 --- a/zlib/configure +++ b/zlib/configure @@ -9963,7 +9963,7 @@ haiku*) soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; From patchwork Mon Aug 7 10:32:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817864 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=F0yzv8O5; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDYx5YwRz1yVt for ; Mon, 7 Aug 2023 21:27:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B34B396E848 for ; Mon, 7 Aug 2023 11:27:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B34B396E848 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407635; bh=bNFFOkKRwy/as2GL147jqpGt7zetNUHtN7nIpABrPmA=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=F0yzv8O5I1puJ+su6eaNn1gxZiXskacmGPvR8ghhKVYWJmTqu4zg/qAbURdT2H9DT 6YhZhRFoj8SD7FhWmIpL8CLKcJkejvzQb99oKXZ1Fjj/+8CayTB3gY2NtnXkGhXUVh tFRwYqZXxKhclvHFD2F23CmeJirmdgJgIcYsm014= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [IPv6:2001:67c:2050:0:465::201]) by sourceware.org (Postfix) with ESMTPS id 2C0C8385734B for ; Mon, 7 Aug 2023 11:19:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C0C8385734B Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4RKDNt4kdLz9sWY; Mon, 7 Aug 2023 13:19:26 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Alan Modra Subject: [PATCH 17/24] egrep in binutils Date: Mon, 7 Aug 2023 12:32:59 +0200 Message-ID: <20230807105935.2098236-18-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SCC_5_SHORT_WORD_LINES, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Alan Modra Apparently some distros have a nagging egrep that helpfully tells you egrep is deprecated and to use "grep -E". The nag message causes a ld testsuite failure. What's more the advice isn't that good. The "-E" flag may not be available with older versions of grep. This patch fixes bare invocation of egrep within binutils, replacing it with the autoconf $EGREP or with grep. config/ChangeLog: * lib-ld.m4 (AC_LIB_PROG_LD_GNU): Require AC_PROG_EGREP and invoke $EGREP. (AC_LIB_PROG_LD): Likewise. gcc/ChangeLog: * configure: Regenerate. intl/ChangeLog: * configure: Regenerate. libcpp/ChangeLog: * configure: Regenerate. libgcc/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. --- config/lib-ld.m4 | 8 +++++--- gcc/configure | 4 ++-- intl/configure | 4 ++-- libcpp/configure | 4 ++-- libgcc/configure | 2 +- libstdc++-v3/configure | 4 ++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/config/lib-ld.m4 b/config/lib-ld.m4 index 11d0ce77342..73cf9571b57 100644 --- a/config/lib-ld.m4 +++ b/config/lib-ld.m4 @@ -12,9 +12,10 @@ dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then +if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no @@ -29,6 +30,7 @@ AC_DEFUN([AC_LIB_PROG_LD], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_PROG_EGREP])dnl # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then @@ -88,7 +90,7 @@ AC_CACHE_VAL(acl_cv_path_LD, # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break diff --git a/gcc/configure b/gcc/configure index e97433d8743..cd9919e858d 100755 --- a/gcc/configure +++ b/gcc/configure @@ -11299,7 +11299,7 @@ else # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break @@ -11327,7 +11327,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then +if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no diff --git a/intl/configure b/intl/configure index 79bb5831a47..42b2a26b5bf 100755 --- a/intl/configure +++ b/intl/configure @@ -5094,7 +5094,7 @@ else # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break @@ -5122,7 +5122,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then +if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no diff --git a/libcpp/configure b/libcpp/configure index 1389ddab544..ed98f40a1c1 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -6811,7 +6811,7 @@ else # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break @@ -6839,7 +6839,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then +if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no diff --git a/libgcc/configure b/libgcc/configure index be5d45f1755..1e727367ba3 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -5032,7 +5032,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then +if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 7a10779b9ff..a545a5178dd 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -29124,7 +29124,7 @@ else # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break @@ -29152,7 +29152,7 @@ if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then +if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no From patchwork Mon Aug 7 10:33:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=kp7rQfoO; dkim-atps=neutral Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDWc4fWNz1yVt for ; Mon, 7 Aug 2023 21:25:16 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB18439524BF for ; Mon, 7 Aug 2023 11:25:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AB18439524BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407514; bh=pM58Aa6JmwiOAd8P8FkUl/5on7RVMVhTYXXKKR4JrHs=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=kp7rQfoOV9M6oDuu5CkvjWvzFz1xvuCQ1fAILneTXQxhfvhuzahiRVhBSftg04Njs 2UNv7fGp3aSJQxvIZIme9aBVZ9iqcnHWsurJOG5FvCDfye7Akn35giwr8t/XMNPq1E ZbMUXrXQN19UYx89XtyASR6xaRPaca4yjJNZdWMw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by sourceware.org (Postfix) with ESMTPS id 4903A3857701 for ; Mon, 7 Aug 2023 11:19:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4903A3857701 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDNv4bYdz9snW; Mon, 7 Aug 2023 13:19:27 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Alan Modra Subject: [PATCH 18/24] PR27116, Spelling errors found by Debian style checker Date: Mon, 7 Aug 2023 12:33:00 +0200 Message-ID: <20230807105935.2098236-19-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Alan Modra config/ChangeLog: * override.m4: Correct comment grammar. --- config/override.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/override.m4 b/config/override.m4 index d3e815bb1b4..5a1bffe6018 100644 --- a/config/override.m4 +++ b/config/override.m4 @@ -32,7 +32,7 @@ m4_ifndef([_GCC_AUTOCONF_VERSION], [m4_define([_GCC_AUTOCONF_VERSION], [2.69])]) dnl Test for the exact version when AC_INIT is expanded. -dnl This allows to update the tree in steps (for testing) +dnl This allows one to update the tree in steps (for testing) dnl by putting dnl m4_define([_GCC_AUTOCONF_VERSION], [X.Y]) dnl in configure.ac before AC_INIT, From patchwork Mon Aug 7 10:33:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817878 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=AWZRGm2s; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDhy6jnfz1yYl for ; Mon, 7 Aug 2023 21:33:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8A89391597A for ; Mon, 7 Aug 2023 11:33:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8A89391597A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407999; bh=EP0q1vF27mi0qmOEJulD0cN/+FtT1TG+ayv89VdkofM=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=AWZRGm2smy5tCPEJ0KylciO1EV5mJSx4WiTMRzJLgnvsKh0nf9GE1S1lYz8+6DJGU oCDi004ekeYv+xHqhJ2R0feMRRm8UcI/s1guP76Cf51Vj2xJ/aF8xXzdlB/qME+qmm hkvxNXzvOrKTmSSMNZDWq18GiW13v4IflmDDnGEc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by sourceware.org (Postfix) with ESMTPS id 025533857011 for ; Mon, 7 Aug 2023 11:19:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 025533857011 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RKDNx0gDmz9sbF; Mon, 7 Aug 2023 13:19:29 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: John Ericson Subject: [PATCH 19/24] Deprecate a.out support for NetBSD targets. Date: Mon, 7 Aug 2023 12:33:01 +0200 Message-ID: <20230807105935.2098236-20-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNx0gDmz9sbF 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, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: John Ericson As discussed previously, a.out support is now quite deprecated, and in some cases removed, in both Binutils itself and NetBSD, so this legacy default makes little sense. `netbsdelf*` and `netbsdaout*` still work allowing the user to be explicit about there choice. Additionally, the configure script warns about the change as Nick Clifton requested. One possible concern was the status of NetBSD on NS32K, where only a.out was supported. But per [1] NetBSD has removed support, and if it were to come back, it would be with ELF. The binutils implementation is therefore marked obsolete, per the instructions in the last message. With that patch and this one applied, I have confirmed the following: --target=i686-unknown-netbsd --target=i686-unknown-netbsdelf builds completely --target=i686-unknown-netbsdaout properly fails because target is deprecated. --target=vax-unknown-netbsdaout builds completely except for gas, where the target is deprecated. [1]: https://mail-index.netbsd.org/tech-toolchain/2021/07/19/msg004025.html config/ChangeLog: * picflag.m4: Simplify SHmedia NetBSD match by presuming ELF. gcc/ChangeLog: * configure: Regenerate. libada/ChangeLog: * configure: Regenerate. libgcc/ChangeLog: * configure: Regenerate. libiberty/ChangeLog: * configure: Regenerate. --- config/picflag.m4 | 4 +--- gcc/configure | 8 +++----- libada/configure | 4 +--- libgcc/configure | 4 +--- libiberty/configure | 4 +--- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/config/picflag.m4 b/config/picflag.m4 index 0aefcf619bf..3f3ac744c96 100644 --- a/config/picflag.m4 +++ b/config/picflag.m4 @@ -63,9 +63,7 @@ case "${$2}" in sh-*-linux* | sh[[2346lbe]]*-*-linux*) $1=-fpic ;; - # FIXME: Simplify to sh*-*-netbsd*? - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) + sh*-*-netbsd*) $1=-fpic ;; # Default to -fPIC unless specified otherwise. diff --git a/gcc/configure b/gcc/configure index cd9919e858d..e5e95e7c1c8 100755 --- a/gcc/configure +++ b/gcc/configure @@ -5480,9 +5480,7 @@ case "${target}" in sh-*-linux* | sh[2346lbe]*-*-linux*) PICFLAG_FOR_TARGET=-fpic ;; - # FIXME: Simplify to sh*-*-netbsd*? - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) + sh*-*-netbsd*) PICFLAG_FOR_TARGET=-fpic ;; # Default to -fPIC unless specified otherwise. @@ -19888,7 +19886,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19891 "configure" +#line 19889 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19994,7 +19992,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19997 "configure" +#line 19995 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libada/configure b/libada/configure index 9c8b133d817..ac4dad3ad3b 100755 --- a/libada/configure +++ b/libada/configure @@ -3231,9 +3231,7 @@ case "${host}" in sh-*-linux* | sh[2346lbe]*-*-linux*) PICFLAG=-fpic ;; - # FIXME: Simplify to sh*-*-netbsd*? - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) + sh*-*-netbsd*) PICFLAG=-fpic ;; # Default to -fPIC unless specified otherwise. diff --git a/libgcc/configure b/libgcc/configure index 1e727367ba3..cf149209652 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -2422,9 +2422,7 @@ case "${host}" in sh-*-linux* | sh[2346lbe]*-*-linux*) PICFLAG=-fpic ;; - # FIXME: Simplify to sh*-*-netbsd*? - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) + sh*-*-netbsd*) PICFLAG=-fpic ;; # Default to -fPIC unless specified otherwise. diff --git a/libiberty/configure b/libiberty/configure index bdc860f1623..dd896270dc6 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -5368,9 +5368,7 @@ case "${host}" in sh-*-linux* | sh[2346lbe]*-*-linux*) PICFLAG=-fpic ;; - # FIXME: Simplify to sh*-*-netbsd*? - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \ - sh64-*-netbsd* | sh64l*-*-netbsd*) + sh*-*-netbsd*) PICFLAG=-fpic ;; # Default to -fPIC unless specified otherwise. From patchwork Mon Aug 7 10:33:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=s3175BEu; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDXs4wwHz1yVt for ; Mon, 7 Aug 2023 21:26:21 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9D8B7395B423 for ; Mon, 7 Aug 2023 11:26:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D8B7395B423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407579; bh=DfvmKMa7wulGRzOSRAV/rjFu6mSKHeSKhv2Ie5vXk1Y=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=s3175BEuOIQUhuyyzoBG9g03w2FHeOdVJOTU7bhroi+uDLBGejo4HYTbZVgsTGcH5 kqm4Pqd4nnlRbFRJtT5PDixpuXZ6t6w84mvBWKTvwZ0/1ePHL9ppiZajt9Ze7FJiNY MVrMq/7icx3Hjm0zcgKmj3e9mS/Wb0mTMUr0uyQs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) by sourceware.org (Postfix) with ESMTPS id A120E385770F for ; Mon, 7 Aug 2023 11:19:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A120E385770F Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4RKDNy10p6z9scG; Mon, 7 Aug 2023 13:19:30 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: "H.J. Lu" Subject: [PATCH 20/24] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works Date: Mon, 7 Aug 2023 12:33:02 +0200 Message-ID: <20230807105935.2098236-21-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: "H.J. Lu" It is quite normal to have headers without library on multilib OSes. Add AC_TRY_LINK to PKG_CHECK_MODULES to check if $pkg_cv_[]$1[]_LIBS works. config/ChangeLog: * pkg.m4 (PKG_CHECK_MODULES): Add AC_TRY_LINK to check if $pkg_cv_[]$1[]_LIBS works. --- config/pkg.m4 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/pkg.m4 b/config/pkg.m4 index 13a88901786..45587e97c8b 100644 --- a/config/pkg.m4 +++ b/config/pkg.m4 @@ -147,6 +147,12 @@ AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) +dnl Check whether $pkg_cv_[]$1[]_LIBS works. +pkg_save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $pkg_cv_[]$1[]_LIBS" +AC_TRY_LINK([],[return 0;], [pkg_failed=no], [pkg_failed=yes]) +LDFLAGS=$pkg_save_LDFLAGS + m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) From patchwork Mon Aug 7 10:33:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Wxj+lgWg; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDXp2q3Kz1yVt for ; Mon, 7 Aug 2023 21:26:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9F7A4395B068 for ; Mon, 7 Aug 2023 11:26:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F7A4395B068 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407575; bh=/LJ22PIy3Uv2fNmvPyCoP33SUWVOPuYtCEkDxUtV6O8=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Wxj+lgWgD7JWCt6kOfTQnatTWokzruGJcm4MLOYcPM/CNcDS+kWYswSIFyGGAAR8N F1T/lsrSR4mQUX0WSJYpy9qOaUgfr5ZWQcF5NPBMdfeZXnDJ9sYmxzcoeYoiXFiOI0 15PePOA68uqFIFup/axkCISm0pOk6oy4VB5GXTFw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by sourceware.org (Postfix) with ESMTPS id B26583856DC0 for ; Mon, 7 Aug 2023 11:19:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B26583856DC0 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4RKDNz1GlBz9sQ8; Mon, 7 Aug 2023 13:19:31 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: "H.J. Lu" Subject: [PATCH 21/24] PKG_CHECK_MODULES: Properly check if $pkg_cv_[]$1[]_LIBS works Date: Mon, 7 Aug 2023 12:33:03 +0200 Message-ID: <20230807105935.2098236-22-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: "H.J. Lu" There is no need to check $pkg_cv_[]$1[]_LIBS works if package check failed. config/ChangeLog: * pkg.m4 (PKG_CHECK_MODULES): Use AC_TRY_LINK only if $pkg_failed = no. --- config/pkg.m4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/config/pkg.m4 b/config/pkg.m4 index 45587e97c8b..7ebf517cd6a 100644 --- a/config/pkg.m4 +++ b/config/pkg.m4 @@ -148,10 +148,12 @@ _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) dnl Check whether $pkg_cv_[]$1[]_LIBS works. -pkg_save_LDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS $pkg_cv_[]$1[]_LIBS" -AC_TRY_LINK([],[return 0;], [pkg_failed=no], [pkg_failed=yes]) -LDFLAGS=$pkg_save_LDFLAGS +if test $pkg_failed = no; then + pkg_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $pkg_cv_[]$1[]_LIBS" + AC_TRY_LINK([],[], [], [pkg_failed=yes]) + LDFLAGS=$pkg_save_LDFLAGS +fi m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. From patchwork Mon Aug 7 10:33:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=pXnCh5fK; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDk91LzKz1yYl for ; Mon, 7 Aug 2023 21:34:25 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 35C543838BA5 for ; Mon, 7 Aug 2023 11:34:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 35C543838BA5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691408063; bh=x7WDyIJjlBAcKmsilgjP0gUOds+a2dp6icUdkY3GlhM=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=pXnCh5fKQ/JqTYmmzzpZaZv1F91xw8FBBRQ51urODUoZRdYaF9YxIRZtT5vne+jSp gh1I2WWZ6I/I+Wczd2w7fCjc6JWRmOmt2SMOO4JRoJOq4aZ7oZRqAjlJtvBM7+Foi4 xlufqqymv/M8ZVnhWR+waA9r2LQHXKYPyPFj+RYE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id CB8833856DCD for ; Mon, 7 Aug 2023 11:19:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB8833856DCD Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RKDP02HZ6z9snC; Mon, 7 Aug 2023 13:19:32 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Nick Alcock Subject: [PATCH 22/24] libtool.m4: augment symcode for Solaris 11 Date: Mon, 7 Aug 2023 12:33:04 +0200 Message-ID: <20230807105935.2098236-23-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Nick Alcock This reports common symbols like GNU nm, via a type code of 'C'. ChangeLog: * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate. --- gcc/configure | 2 +- libatomic/configure | 2 +- libbacktrace/configure | 2 +- libcc1/configure | 2 +- libffi/configure | 2 +- libgfortran/configure | 2 +- libgm2/configure | 2 +- libgomp/configure | 2 +- libitm/configure | 2 +- libobjc/configure | 2 +- libphobos/configure | 2 +- libquadmath/configure | 2 +- libsanitizer/configure | 2 +- libssp/configure | 2 +- libstdc++-v3/configure | 2 +- libtool.m4 | 2 +- libvtv/configure | 2 +- lto-plugin/configure | 2 +- zlib/configure | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/gcc/configure b/gcc/configure index e5e95e7c1c8..ea1ad6606a6 100755 --- a/gcc/configure +++ b/gcc/configure @@ -15346,7 +15346,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libatomic/configure b/libatomic/configure index 75096735c61..57f320753e1 100755 --- a/libatomic/configure +++ b/libatomic/configure @@ -6593,7 +6593,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libbacktrace/configure b/libbacktrace/configure index f3ef3fc3f23..c3e7b884e36 100755 --- a/libbacktrace/configure +++ b/libbacktrace/configure @@ -7038,7 +7038,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libcc1/configure b/libcc1/configure index edf03334f30..1a63a0e4e1a 100755 --- a/libcc1/configure +++ b/libcc1/configure @@ -6299,7 +6299,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libffi/configure b/libffi/configure index a1ded4f617b..9eac9c907bf 100755 --- a/libffi/configure +++ b/libffi/configure @@ -6825,7 +6825,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libgfortran/configure b/libgfortran/configure index 7b408515498..cd176b04a14 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -8227,7 +8227,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libgm2/configure b/libgm2/configure index 2d54302129c..f576681098f 100755 --- a/libgm2/configure +++ b/libgm2/configure @@ -8129,7 +8129,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libgomp/configure b/libgomp/configure index 6d4b6e3850e..a12b30f1b0f 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -6607,7 +6607,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libitm/configure b/libitm/configure index 83ff24b73e8..02e8de7896b 100755 --- a/libitm/configure +++ b/libitm/configure @@ -7268,7 +7268,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libobjc/configure b/libobjc/configure index fd590e628ab..752f6fdfebd 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -5995,7 +5995,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libphobos/configure b/libphobos/configure index 814cacc1120..b7276d95010 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -7272,7 +7272,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libquadmath/configure b/libquadmath/configure index 3ddaa5159d9..0b145a644c3 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -6294,7 +6294,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libsanitizer/configure b/libsanitizer/configure index 82c4cf531de..0805d254fe5 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -7881,7 +7881,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libssp/configure b/libssp/configure index 413f10fa6a2..7f8b8fdf99d 100755 --- a/libssp/configure +++ b/libssp/configure @@ -6480,7 +6480,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index a545a5178dd..c4da56c3042 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -7523,7 +7523,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/libtool.m4 b/libtool.m4 index 027d03c4cf1..e36fdd3c0e2 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -3434,7 +3434,7 @@ osf*) symcode='[[BCDEGQRST]]' ;; solaris*) - symcode='[[BDRT]]' + symcode='[[BCDRT]]' ;; sco3.2v5*) symcode='[[DT]]' diff --git a/libvtv/configure b/libvtv/configure index 55d4b698cee..917557103e9 100755 --- a/libvtv/configure +++ b/libvtv/configure @@ -7776,7 +7776,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/lto-plugin/configure b/lto-plugin/configure index 5473d138d23..37c44d04a0d 100755 --- a/lto-plugin/configure +++ b/lto-plugin/configure @@ -7647,7 +7647,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' diff --git a/zlib/configure b/zlib/configure index e224f1c8220..273ac36647d 100755 --- a/zlib/configure +++ b/zlib/configure @@ -5960,7 +5960,7 @@ osf*) symcode='[BCDEGQRST]' ;; solaris*) - symcode='[BDRT]' + symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' From patchwork Mon Aug 7 10:33:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=feSac67r; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDdp2Qnzz1yYl for ; Mon, 7 Aug 2023 21:30:38 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3C3843882AFB for ; Mon, 7 Aug 2023 11:30:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C3843882AFB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407836; bh=y0vCFDOKVY/3q3BBtzxzYpAJfV4W82TWDNjofCbYE6g=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=feSac67rgC3xVuAtEqHKdwO0tHHSEA4mZID5L52P0zhm+2qxxpuGwK1+y9Ruhyj9P ZmjLdW1fn5zzw1QGfKqmAvlnucfREQJxvZ6hcBCIB96sUTPsM8xhEta/wDZKuwHlW7 Jhj68ai0qh2ykMT03nYL7e6dkArwLpBaqJeEgkGU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id 04834385702B for ; Mon, 7 Aug 2023 11:19:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04834385702B Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4RKDP131T0z9sck; Mon, 7 Aug 2023 13:19:33 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Indu Bhagat Subject: [PATCH 23/24] bfd: linker: merge .sframe sections Date: Mon, 7 Aug 2023 12:33:05 +0200 Message-ID: <20230807105935.2098236-24-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDP131T0z9sck 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, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Indu Bhagat The linker merges all the input .sframe sections. When merging, the linker verifies that all the input .sframe sections have the same abi/arch. The linker uses libsframe library to perform key actions on the .sframe sections - decode, read, and create output data. This implies buildsystem changes to make and install libsframe before libbfd. The linker places the output .sframe section in a new segment of its own: PT_GNU_SFRAME. A new segment is not added, however, if the generated .sframe section is empty. When a section is discarded from the final link, the corresponding entries in the .sframe section for those functions are also deleted. The linker sorts the SFrame FDEs on start address by default and sets the SFRAME_F_FDE_SORTED flag in the .sframe section. This patch also adds support for generation of SFrame unwind information for the .plt* sections on x86_64. SFrame unwind info is generated for IBT enabled PLT, lazy/non-lazy PLT. The existing linker option --no-ld-generated-unwind-info has been adapted to include the control of whether .sframe unwind information will be generated for the linker generated sections like PLT. Changes to the linker script have been made as necessary. ChangeLog: * Makefile.def: Add install dependency on libsframe for libbfd. * Makefile.in: Regenerated. --- Makefile.def | 4 ++++ Makefile.in | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/Makefile.def b/Makefile.def index 86d25f43762..0c6784b6da1 100644 --- a/Makefile.def +++ b/Makefile.def @@ -459,11 +459,14 @@ dependencies = { module=all-gdbsupport; on=all-gnulib; }; dependencies = { module=all-gdbsupport; on=all-intl; }; // Host modules specific to binutils. +// build libsframe before bfd for encoder/decoder support for linking +// SFrame sections dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; }; dependencies = { module=configure-bfd; on=configure-intl; }; dependencies = { module=all-bfd; on=all-libiberty; }; dependencies = { module=all-bfd; on=all-intl; }; dependencies = { module=all-bfd; on=all-zlib; }; +dependencies = { module=all-bfd; on=all-libsframe; }; dependencies = { module=configure-opcodes; on=configure-libiberty; hard=true; }; dependencies = { module=all-opcodes; on=all-libiberty; }; @@ -489,6 +492,7 @@ dependencies = { module=install-binutils; on=install-opcodes; }; dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; // Likewise for ld, libctf, and bfd. +dependencies = { module=install-bfd; on=install-libsframe; }; dependencies = { module=install-libctf; on=install-bfd; }; dependencies = { module=install-ld; on=install-bfd; }; dependencies = { module=install-ld; on=install-libctf; }; diff --git a/Makefile.in b/Makefile.in index 214a2a15544..35a5d8c575d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -66354,6 +66354,16 @@ all-stagetrain-bfd: maybe-all-stagetrain-zlib all-stagefeedback-bfd: maybe-all-stagefeedback-zlib all-stageautoprofile-bfd: maybe-all-stageautoprofile-zlib all-stageautofeedback-bfd: maybe-all-stageautofeedback-zlib +all-bfd: maybe-all-libsframe +all-stage1-bfd: maybe-all-stage1-libsframe +all-stage2-bfd: maybe-all-stage2-libsframe +all-stage3-bfd: maybe-all-stage3-libsframe +all-stage4-bfd: maybe-all-stage4-libsframe +all-stageprofile-bfd: maybe-all-stageprofile-libsframe +all-stagetrain-bfd: maybe-all-stagetrain-libsframe +all-stagefeedback-bfd: maybe-all-stagefeedback-libsframe +all-stageautoprofile-bfd: maybe-all-stageautoprofile-libsframe +all-stageautofeedback-bfd: maybe-all-stageautofeedback-libsframe configure-opcodes: configure-libiberty configure-stage1-opcodes: configure-stage1-libiberty configure-stage2-opcodes: configure-stage2-libiberty @@ -66486,6 +66496,7 @@ all-stageautoprofile-binutils: maybe-all-stageautoprofile-libsframe all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe install-binutils: maybe-install-opcodes install-strip-binutils: maybe-install-strip-opcodes +install-bfd: maybe-install-libsframe install-libctf: maybe-install-bfd install-ld: maybe-install-bfd install-ld: maybe-install-libctf From patchwork Mon Aug 7 10:33:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 1817875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=HXuy/81t; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RKDfv3vCmz1yYl for ; Mon, 7 Aug 2023 21:31:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EFEB380D997 for ; Mon, 7 Aug 2023 11:31:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7EFEB380D997 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691407893; bh=NFGoW5W9FO3kYpxNEf32sGa+M4+2DzqdHmp6V1X2znE=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=HXuy/81tL5kHcYLCRU+f21Eppn3o4ajnJ24hquJ0ipkdfajx2axZ0gm1LScgf/gnX mJY1imSkHhrZ8bVvLls7qSszbyF0KwAPQ5IQ+0BxoT7IYuPYFkZZCiqeATh3TPLQG0 Gg4sBDsspD0SqohD3fBLO0D3nTIbuZpz3KDuKdXI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) by sourceware.org (Postfix) with ESMTPS id DD2F03856DF2 for ; Mon, 7 Aug 2023 11:19:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DD2F03856DF2 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4RKDP22xpCz9sRD; Mon, 7 Aug 2023 13:19:34 +0200 (CEST) To: gcc-patches@gcc.gnu.org Cc: Indu Bhagat Subject: [PATCH 24/24] toplevel: Makefile.def: add install-strip dependency on libsframe Date: Mon, 7 Aug 2023 12:33:06 +0200 Message-ID: <20230807105935.2098236-25-arsen@aarsen.me> In-Reply-To: <20230807105935.2098236-1-arsen@aarsen.me> References: <20230807105935.2098236-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDP22xpCz9sRD X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, 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: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gcc-patches?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Indu Bhagat As noted in PR libsframe/30014 - FTBFS: install-strip fails because bfdlib relinks and fails to find libsframe, the install time dependencies of libbfd need to be updated. ChangeLog: * Makefile.def: Reflect that libsframe needs to installed before libbfd. Reorder a bit to better track libsframe dependencies. * Makefile.in: Regenerate. --- Makefile.def | 5 ++++- Makefile.in | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.def b/Makefile.def index 0c6784b6da1..870150183b9 100644 --- a/Makefile.def +++ b/Makefile.def @@ -492,7 +492,6 @@ dependencies = { module=install-binutils; on=install-opcodes; }; dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; // Likewise for ld, libctf, and bfd. -dependencies = { module=install-bfd; on=install-libsframe; }; dependencies = { module=install-libctf; on=install-bfd; }; dependencies = { module=install-ld; on=install-bfd; }; dependencies = { module=install-ld; on=install-libctf; }; @@ -500,6 +499,10 @@ dependencies = { module=install-strip-libctf; on=install-strip-bfd; }; dependencies = { module=install-strip-ld; on=install-strip-bfd; }; dependencies = { module=install-strip-ld; on=install-strip-libctf; }; +// libbfd depends on libsframe +dependencies = { module=install-bfd; on=install-libsframe; }; +dependencies = { module=install-strip-bfd; on=install-strip-libsframe; }; + // libopcodes depends on libbfd dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; }; dependencies = { module=install-opcodes; on=install-bfd; }; diff --git a/Makefile.in b/Makefile.in index 35a5d8c575d..c97130a2338 100644 --- a/Makefile.in +++ b/Makefile.in @@ -66496,13 +66496,14 @@ all-stageautoprofile-binutils: maybe-all-stageautoprofile-libsframe all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe install-binutils: maybe-install-opcodes install-strip-binutils: maybe-install-strip-opcodes -install-bfd: maybe-install-libsframe install-libctf: maybe-install-bfd install-ld: maybe-install-bfd install-ld: maybe-install-libctf install-strip-libctf: maybe-install-strip-bfd install-strip-ld: maybe-install-strip-bfd install-strip-ld: maybe-install-strip-libctf +install-bfd: maybe-install-libsframe +install-strip-bfd: maybe-install-strip-libsframe configure-opcodes: configure-bfd configure-stage1-opcodes: configure-stage1-bfd configure-stage2-opcodes: configure-stage2-bfd