From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id E3C123857C4B for ; Fri, 9 Sep 2022 10:10:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3C123857C4B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 98C9815DB; Fri, 9 Sep 2022 03:10:30 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D0CF83F73D; Fri, 9 Sep 2022 03:10:23 -0700 (PDT) From: Ross Burton To: gcc-patches@gcc.gnu.org Cc: nd@arm.com Subject: [PATCH] Makefile.tpl: pass CXXFLAGS_FOR_BUILD where appropriate Date: Fri, 9 Sep 2022 11:10:12 +0100 Message-Id: <20220909101012.3029395-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-17.0 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,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 List-Id: If CXXFLAGS contains something unsupported by the build CXX, we see build failures (e.g. using -fmacro-prefix-map for the target). Ensure that CXXFLAGS_FOR_BUILD is passed where appropriate so that the correct flags are used. ChangeLog: * Makefile.in: Regenerate. * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides Signed-off-by: Ross Burton --- Makefile.in | 2 ++ Makefile.tpl | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Makefile.in b/Makefile.in index 1919dfee829..6f96852ed80 100644 --- a/Makefile.in +++ b/Makefile.in @@ -176,6 +176,7 @@ BUILD_EXPORTS = \ # built for the build system to override those in BASE_FLAGS_TO_PASS. EXTRA_BUILD_FLAGS = \ CFLAGS="$(CFLAGS_FOR_BUILD)" \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ LDFLAGS="$(LDFLAGS_FOR_BUILD)" # This is the list of directories to built for the host system. @@ -207,6 +208,7 @@ HOST_EXPORTS = \ CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \ LD="$(LD)"; export LD; \ diff --git a/Makefile.tpl b/Makefile.tpl index c7344558429..5876ad5aa5d 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -179,6 +179,7 @@ BUILD_EXPORTS = \ # built for the build system to override those in BASE_FLAGS_TO_PASS. EXTRA_BUILD_FLAGS = \ CFLAGS="$(CFLAGS_FOR_BUILD)" \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ LDFLAGS="$(LDFLAGS_FOR_BUILD)" # This is the list of directories to built for the host system. @@ -210,6 +211,7 @@ HOST_EXPORTS = \ CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \ LD="$(LD)"; export LD; \ -- 2.34.1