From patchwork Mon Jul 17 08:13:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 1808592 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=XyO0xF0w; 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 4R4FG739Lrz20Cs for ; Mon, 17 Jul 2023 18:13:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4709B385842E for ; Mon, 17 Jul 2023 08:13:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4709B385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689581613; bh=LV3F5XKDW2V5pl8izPvdyxRT/0ucn0R2QCzKzs99r6c=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=XyO0xF0wNE/WY+7yHHF24RDv7niSkPG6BL1b2/6TcfsgkeKbcdXLZY/zRGbPrIb5C fU3RwlFxaazL5MHA5ajyOsn5W/6m4MzF5nh0y+lqAbmNhx0LNuuwMYVQnUXCLubfc7 feka6IqRghcQZrsACpqnLW3KnKqpy6eWfl+rh8H4= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 4A72A3858D1E for ; Mon, 17 Jul 2023 08:13:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A72A3858D1E Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 6F75E21981 for ; Mon, 17 Jul 2023 08:13:09 +0000 (UTC) Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 64BCB2C152 for ; Mon, 17 Jul 2023 08:13:09 +0000 (UTC) Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 53A384AAD56; Mon, 17 Jul 2023 10:13:09 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Use substituted GDCFLAGS X-Yow: Are we on STRIKE yet? Date: Mon, 17 Jul 2023 10:13:09 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Andreas Schwab via Gcc-patches From: Andreas Schwab Reply-To: Andreas Schwab Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Use the substituted value for GCDFLAGS instead of hardcoding $(CFLAGS) so that the subdir configure scripts use the configured value. * configure.ac (GDCFLAGS): Set default from ${CFLAGS}. * configure: Regenerate. * Makefile.in (GDCFLAGS): Substitute @GDCFLAGS@. --- Makefile.in | 2 +- configure | 1 + configure.ac | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 04307ca561b..144bccd2603 100644 --- a/Makefile.in +++ b/Makefile.in @@ -444,7 +444,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. diff --git a/configure b/configure index 0d3f5c6455d..3269da9829f 100755 --- a/configure +++ b/configure @@ -12947,6 +12947,7 @@ fi +GDCFLAGS=${GDCFLAGS-${CFLAGS}} # Target tools. diff --git a/configure.ac b/configure.ac index dddab2a56d8..d07a0fa7698 100644 --- a/configure.ac +++ b/configure.ac @@ -3662,6 +3662,7 @@ AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) AC_SUBST(GDC) AC_SUBST(GDCFLAGS) +GDCFLAGS=${GDCFLAGS-${CFLAGS}} # Target tools. AC_ARG_WITH([build-time-tools],