From patchwork Mon Jan 11 19:53:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1424808 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: 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=LEh4UiEA; dkim-atps=neutral Received: from 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DF4C91cMFz9sXb for ; Tue, 12 Jan 2021 06:53:39 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1433C3836C2C; Mon, 11 Jan 2021 19:53:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1433C3836C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1610394807; bh=F0jMVtfvMzrh9p1uYwNZr1PzD0aR/cB6fPWsd9zGVFw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=LEh4UiEA85+0uOt+moNu/eHCjFYk+ZLE/6+Vv6KNPqZqDrkkAroe9w5bY3AFLj94l oSRaNtud8UjmeSzzLwDjx+jf0DhKaM6F2htteFejY4bpnFHyITzGN6PK0L8Fa6ez2o QBoe0FmYK5KftC/2SNlhN7BRY5TV+wFFwqecpXeM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id A3A06384B406 for ; Mon, 11 Jan 2021 19:53:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A3A06384B406 Received: by mail-pg1-x52d.google.com with SMTP id z21so358876pgj.4 for ; Mon, 11 Jan 2021 11:53:20 -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:mime-version :content-transfer-encoding; bh=F0jMVtfvMzrh9p1uYwNZr1PzD0aR/cB6fPWsd9zGVFw=; b=JAyOvAFY7DRWj5/d7/ymKUXtlTnB75KIL811yg3/gce+ogumT35ylA35YRPYjebDpT I3ZDVI49CThLw4YtHmAy5dJcbbCxzdSntGqFr9mS4ne60hrtVRJ2FBPNY2r2clpWMvZ3 /lfcNuMXr8W4xigXWG84CnxP+7XzQzntfErxIJY95lSWMKdRmcxdHy1BvjxM/iphbBnv Yhapsb0sl16aB2cWp4y4f9dAeRuY8oeoQ8y8nTqS/5AHlrx+G6D+6QGsZgdwc10q6Qqq 1g7N7FndNnkKcys8t/jMSqORjILqcJNmvPDy/xDS5Hv2lFWAVhvOuwtgtryM853v4v7W 5vWw== X-Gm-Message-State: AOAM530RyyQm0CynqB0yOs4kr6kxCAxE4K0c8wPyLJROf/0P8lmB1PAE jtOMUFYPnnQHkh+vv/42u/gdoPC1qGM= X-Google-Smtp-Source: ABdhPJzT887IKCBxrnVFw/ZGyhl2GyWv6ew3fCGXZdUK+689bF1H3Std1kYZD1tzdqCOKRJj18xCgQ== X-Received: by 2002:a62:7f4c:0:b029:19e:23d1:cf0a with SMTP id a73-20020a627f4c0000b029019e23d1cf0amr954433pfd.67.1610394799272; Mon, 11 Jan 2021 11:53:19 -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 t206sm485913pgb.84.2021.01.11.11.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 11:53:18 -0800 (PST) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 905511A041E; Mon, 11 Jan 2021 11:53:17 -0800 (PST) To: binutils@sourceware.org Subject: [PATCH] binuitils: Check if AR is usable for LTO build Date: Mon, 11 Jan 2021 11:53:15 -0800 Message-Id: <20210111195315.192203-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-Spam-Status: No, score=-3039.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Check if AR is usable for LTO build with --enable-pgo-build=lto: checking for -plugin option... ar: no operation specified Failed: ar --plugin /usr/gcc-11.0.0-x32/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/liblto_plugin.so rc no configure: error: AR with --plugin and rc is required for LTO build instead of build failure later. PR binutils/26766 * configure.ac: * configure: Regenerated. --- configure | 4 ++++ configure.ac | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configure b/configure index c44184f72ff..84285addafe 100755 --- a/configure +++ b/configure @@ -10240,6 +10240,10 @@ if test -n "$PLUGIN_OPTION"; then if $RANLIB --help 2>&1 | grep -q "\--plugin"; then RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" fi +else + if test "$enable_pgo_build" != "no"; then + as_fn_error $? "AR with --plugin and rc is required for LTO build" "$LINENO" 5 + fi fi diff --git a/configure.ac b/configure.ac index 9dd51c36e5a..d39019d7093 100644 --- a/configure.ac +++ b/configure.ac @@ -3452,6 +3452,10 @@ if test -n "$PLUGIN_OPTION"; then if $RANLIB --help 2>&1 | grep -q "\--plugin"; then RANLIB_PLUGIN_OPTION="$PLUGIN_OPTION" fi +else + if test "$enable_pgo_build" != "no"; then + AC_MSG_ERROR([AR with --plugin and rc is required for LTO build]) + fi fi AC_SUBST(AR_PLUGIN_OPTION) AC_SUBST(RANLIB_PLUGIN_OPTION)