From patchwork Mon Aug 7 11:07:17 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: 131860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1394497vqr; Mon, 7 Aug 2023 05:00:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIacbkQhLSVUh7efKZDy7YT9T2lC77m4MDkPgxKvZpM8LU9nSxzrOmAAaPYsiKsVN3V/Js X-Received: by 2002:a19:9106:0:b0:4fd:fc3e:722c with SMTP id t6-20020a199106000000b004fdfc3e722cmr5529177lfd.58.1691409636480; Mon, 07 Aug 2023 05:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691409636; cv=none; d=google.com; s=arc-20160816; b=nysS/d3IJy+P1hXJ+wQlSzgeHg0n8kslJdfFOuUFVct0jCtayfy1oDZ35Kf5G7UXgG itQzf9Ea/awjOwpzXuyIYAj5uTgoq+QB4se71YR0C1c2WPHHOKfzwsGZGla5pgtLNwkV Qs6v/hjOhk2/TOlTVPwGL4UdFZVbokYuXVKicYAv4tU9iTBRv69OlkgArDD4SMmeuk+U SCHKGTz6TYBR61weUwPJ5CX+bOAbY7Wuw9dzM4qp2Cphd47+RZAEl6CzZ6yrTEA33dAK hqAVRBA0IGdVeMV9W9cq8tlZTt5moxQOu5188iTYNruVZnhuDiAZPuIdddgzu2dut585 t7ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=FwK7yWtJ+gRIfee+s3uHqZ1A8efFmCZ4sIm3g+0oGmk=; fh=5m/Ou5nb9mSX4jgWjeSrLy5XL/K/fwRPXiU1Ypr6h+w=; b=zYiFZhbA0G0aKvZ90xNNYiQIdgb0adZMdVVwIeEPMCurrwJfpEhzmhuJUC7ZnwQzOs w+souJhtuoauz/FhwzdS37tLE8S964Q/XzywMwvCNMuVOko5LT3OhIfHQy1oDwGPTzhC vVHm8Ira1udx+7d5uUUMUAz9Z3wusp9MaoibTL1nTEgYdUola9VFnvkCTFQgVmFGRefs kPujlzZ5FnlOihuPDls213HBlKLzIzduTDd0njYytTNcJAL4M4ArQErVs3SrYV98zVcw NDqlJaif0D7mk59QAHf9VA5H11deCAaMFpONrlo5DPeLbGxTBuMlIslW6SAKgnGa+2fZ qD2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=K49bPZgr; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id y3-20020aa7c243000000b00522b93d47c1si5389381edo.448.2023.08.07.05.00.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 05:00:36 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=K49bPZgr; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3EA253915959 for ; Mon, 7 Aug 2023 11:33:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3EA253915959 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691407995; bh=FwK7yWtJ+gRIfee+s3uHqZ1A8efFmCZ4sIm3g+0oGmk=; 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=K49bPZgrUdPybSynWqG9DvQuUNHfSSRTRbN50b404wx0xDCTqo4qAep72kNyMuSBB 2M5gEuCNgVcI4jJJFNVOOh0b6U+BGletYZEeEC8dOaT9UFwvOfQzGAL3Q3rf5TN7ER 3Awt4rMZLLdQPxZkZ6Df0X2r/MokGhKKIPwq7Yhk= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.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 A11873858020; Mon, 7 Aug 2023 11:19:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A11873858020 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-201.mailbox.org (Postfix) with ESMTPS id 4RKDNs15Zfz9sV0; Mon, 7 Aug 2023 13:19:25 +0200 (CEST) To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Iain Sandoe Subject: [PATCH 14/45] configure: Account CXXFLAGS in gcc-plugin.m4. Date: Mon, 7 Aug 2023 13:07:17 +0200 Message-ID: <20230807111029.2320238-15-arsen@aarsen.me> In-Reply-To: <20230807111029.2320238-1-arsen@aarsen.me> References: <20230807111029.2320238-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDNs15Zfz9sV0 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Binutils?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773571551370345220 X-GMAIL-MSGID: 1773571551370345220 From: Iain Sandoe We now use a C++ compiler so that we need to process CXXFLAGS as well as CFLAGS in the gcc-plugin config fragment. Signed-off-by: Iain Sandoe config/ChangeLog: * gcc-plugin.m4: Save and process CXXFLAGS. --- config/gcc-plugin.m4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 16ebe25182b..c731a6fab38 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -91,14 +91,18 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], # Check that we can build shared objects with -fPIC -shared saved_LDFLAGS="$LDFLAGS" saved_CFLAGS="$CFLAGS" + saved_CXXFLAGS="$CXXFLAGS" case "${host}" in *-*-darwin*) CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g` CFLAGS="$CFLAGS -fPIC" + CXXFLAGS=`echo $CXXFLAGS | sed s/-mdynamic-no-pic//g` + CXXFLAGS="$CXXFLAGS -fPIC" LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup" ;; *) CFLAGS="$CFLAGS -fPIC" + CXXFLAGS="$CXXFLAGS -fPIC" LDFLAGS="$LDFLAGS -fPIC -shared" ;; esac @@ -113,6 +117,7 @@ AC_DEFUN([GCC_ENABLE_PLUGINS], fi LDFLAGS="$saved_LDFLAGS" CFLAGS="$saved_CFLAGS" + CXXFLAGS="$saved_CXXFLAGS" # If plugin support had been requested but not available, fail. if test x"$enable_plugin" = x"no" ; then