From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id OAR6Om2D/F+LHgAAWB0awg (envelope-from ) for ; Mon, 11 Jan 2021 11:57:17 -0500 Received: by simark.ca (Postfix, from userid 112) id E28051EEF8; Mon, 11 Jan 2021 11:57:17 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4E2981E4F4 for ; Mon, 11 Jan 2021 11:57:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7BBC3388702C; Mon, 11 Jan 2021 16:57:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BBC3388702C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610384236; bh=F/xrVb4lu84O3FJP/D006n5JuKRMQ+nVZRSiTiGntP0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OtGHI5OuD3eamrMshhWClcAFcFrTf3lg/sZ8FEk44+GMsCbmXFXNGXpbUjp1WSEdt 5srK/sU8Tbhi90tDEjmDvtt2bTMmDFMSEhwxdmhvTMlYE73UUsrXaeSszDJEF7hlwt gppXqrxxE/X+113EWzDXEUOS+XGOj+7zDhr9h9OI= Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id CA7CC383F85D; Mon, 11 Jan 2021 16:57:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CA7CC383F85D Received: by mail-pf1-x436.google.com with SMTP id m6so279567pfm.6; Mon, 11 Jan 2021 08:57:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F/xrVb4lu84O3FJP/D006n5JuKRMQ+nVZRSiTiGntP0=; b=IuUGUNgcG6/UHXw7IVQd9eD5R9FUw1b/5Qw7Rh09DJKz15IMsKmZ+dU268GiThQjvM rGJevYgdtarKWRxxsLKtS38frm+APaAsUAjFToz8uAsEyKTbf7SDlQWiBC4361EXABP8 Pl33HoHrRTSfZcTkrqNcAcpAI7qYv4PlXfPJtHjeD12uwCHxlQDRP24L7TbM8ZppKDHd pFTKJnq/Qr/b8FTHAhFpQSHYyH2I2lGyiX5llzenS/D18IjNFnnNXj/sie7KQYEJpWHa /of1Ap2NoonjHw93f7UaAYSFvuF2GQg0/mEJHWQNqLLLwPgPOyDmPplxDN7F0/ufhVjR rOtA== X-Gm-Message-State: AOAM531iNFxmVQHmcsJGgfS1xp1+TQDhr3jPcdnqYyGOKAy6R6zFBLf3 JD4ierOdgz5nwa+vsf8ZIaA/jPAkiBQ= X-Google-Smtp-Source: ABdhPJy4dCHKvBPGiKYmqCMC/aCq9K6LMmkJObc7p45QTfvgtmG71jZSxSsLcFtskrJpvRUqAxGGeg== X-Received: by 2002:a62:ae0c:0:b029:1a5:819d:9ac5 with SMTP id q12-20020a62ae0c0000b02901a5819d9ac5mr308936pff.26.1610384230957; Mon, 11 Jan 2021 08:57:10 -0800 (PST) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id m13sm177205pff.21.2021.01.11.08.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 08:57:09 -0800 (PST) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id DF91E1A06F4; Mon, 11 Jan 2021 08:57:08 -0800 (PST) To: binutils@sourceware.org Subject: [PATCH 2/2] Binutils: Check if AR works with --plugin and rc Date: Mon, 11 Jan 2021 08:57:06 -0800 Message-Id: <20210111165706.92117-3-hjl.tools@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210111165706.92117-1-hjl.tools@gmail.com> References: <20210111165706.92117-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "H.J. Lu via Gdb-patches" Reply-To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, Joel Brobecker Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. bfd/ PR ld/27173 binutils/ PR ld/27173 * configure: Regenerated. gas/ PR ld/27173 * configure: Regenerated. gprof/ PR ld/27173 * configure: Regenerated. ld/ PR ld/27173 * configure: Regenerated. libctf/ PR ld/27173 * configure: Regenerated. opcodes/ PR ld/27173 * configure: Regenerated. --- bfd/configure | 13 ++++++++++--- binutils/configure | 13 ++++++++++--- gas/configure | 13 ++++++++++--- gprof/configure | 13 ++++++++++--- ld/configure | 13 ++++++++++--- libctf/configure | 13 ++++++++++--- opcodes/configure | 13 ++++++++++--- 7 files changed, 70 insertions(+), 21 deletions(-) diff --git a/bfd/configure b/bfd/configure index 4b8dede2150..6142cb26f50 100755 --- a/bfd/configure +++ b/bfd/configure @@ -6932,7 +6932,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11742,7 +11749,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11745 "configure" +#line 11752 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11848,7 +11855,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11851 "configure" +#line 11858 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/binutils/configure b/binutils/configure index f1b80648d3f..249aa16c6fc 100755 --- a/binutils/configure +++ b/binutils/configure @@ -6728,7 +6728,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11569,7 +11576,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11572 "configure" +#line 11579 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11675,7 +11682,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11678 "configure" +#line 11685 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gas/configure b/gas/configure index 43ac48491db..57aef39de28 100755 --- a/gas/configure +++ b/gas/configure @@ -6516,7 +6516,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11357,7 +11364,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11360 "configure" +#line 11367 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11463,7 +11470,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11466 "configure" +#line 11473 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gprof/configure b/gprof/configure index ce3a1d5bd11..30dc9257368 100755 --- a/gprof/configure +++ b/gprof/configure @@ -6363,7 +6363,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11204,7 +11211,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11207 "configure" +#line 11214 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11310,7 +11317,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11313 "configure" +#line 11320 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/ld/configure b/ld/configure index d7cd782957f..e551a2e431b 100755 --- a/ld/configure +++ b/ld/configure @@ -7214,7 +7214,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -12056,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 12059 "configure" +#line 12066 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12162,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 12165 "configure" +#line 12172 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libctf/configure b/libctf/configure index 3d2f22528d3..b4e6a4cc1f2 100755 --- a/libctf/configure +++ b/libctf/configure @@ -6720,7 +6720,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11531,7 +11538,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11534 "configure" +#line 11541 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11637,7 +11644,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11640 "configure" +#line 11647 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/opcodes/configure b/opcodes/configure index 92b4b2247d6..6149d0529b5 100755 --- a/opcodes/configure +++ b/opcodes/configure @@ -6641,7 +6641,14 @@ 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 + echo "Failed: $AR $plugin_option rc" + else + AR="$AR $plugin_option" + fi + rm -f conftest.* fi fi test -z "$AR_FLAGS" && AR_FLAGS=cru @@ -11452,7 +11459,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11455 "configure" +#line 11462 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11558,7 +11565,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11561 "configure" +#line 11568 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- 2.29.2