From patchwork Fri Sep 9 10:10:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1113 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp641795wrt; Fri, 9 Sep 2022 03:11:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR64Y+1Gonl6yexkYdDrTFABRUkl4PZCHKQoBRRjj64b/DRmcQ5c5a6u9LZNV46XVr/ZT3ZY X-Received: by 2002:aa7:d853:0:b0:44e:8a89:52f with SMTP id f19-20020aa7d853000000b0044e8a89052fmr10791525eds.293.1662718268214; Fri, 09 Sep 2022 03:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662718268; cv=none; d=google.com; s=arc-20160816; b=blvMIHU5pRMm0WkTQxVn3Y3kTJ1Skp823hS1BdkaXGUuh4hjaiwDpHzK+GKPP956o2 on2tS+8KT75mQT6CEYMq2ndrBNt7Q82V0IjoOX8U7QOlSwwYTeQoCcozOt230hW2z/3U naauB0jgglMm40faXvoBDNKlNhB5R4tjhgBZb/Houk97o1aRQDh1+jKrwmL7qjCrPmje ixOpD1+cqQlwxtfsg1Zxm+EI57F4QCVv12D1biE4C/H4nqIsof8o72vH6cvzKJFfuSM4 WIjfdZBXlFrb03jCeTjiDa7UyULQTkyygdT44mhfqeMY8Lo4M4VPmQDZDRBu7U5N7Did P00w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=UqeORJfnQ7aedcXhMYzGOBWI2gltJpIJM2l6GlqzxcE=; b=Hn8HkW1DEcqCEDfitjN7pEFXLH48WpBGqLsU2eZ3IaAmIVPb9O5n5Aq2iScT03yb3y F2F17VpQ/i6KPNe3n4USm3xChYWVcIT899ntHYBc+QqbabG14FL9VvagIedTenma8vge lkBj3xZvdc8yOSrS7NteXkHYVrDuhc3HoAmVJTrtZFsYt0Iz0sjGackcK+gaoqJXNPID u/L9GFPP59/X1tQTfKC0dBJ2zGzvyk9kYW++PBhMZ+Y2F316w5KN9jND59LJ1rOR86W6 PLB8b2T9LRqspBIQB+uGQ6GMbAJfw/3g689cpHe7YCcXF31dSNUT9oVn3SQNch/FKgPy xhog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="yzLsKYm/"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hd19-20020a170907969300b0076fa013dde4si128497ejc.266.2022.09.09.03.11.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 03:11:08 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="yzLsKYm/"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2D64D3857348 for ; Fri, 9 Sep 2022 10:11:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D64D3857348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662718267; bh=UqeORJfnQ7aedcXhMYzGOBWI2gltJpIJM2l6GlqzxcE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yzLsKYm/K7FATgnBE1CCDdnczTjEp9RtWbqGPyAFjW9qQpswyu0mAUXvTg8kKxCsg 2yOdO+PhXEMp62IvpNR2bopFxrRal9S7LiykGUw4WJl3sBC9X9z2EOWWI6ZGf2DqnK SNuPayvsZirLZYpxRvwGoLn2yDUrYUGSVWJEZ/Vs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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) To: gcc-patches@gcc.gnu.org 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 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 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: Ross Burton via Gcc-patches From: Ross Burton Reply-To: Ross Burton Cc: nd@arm.com Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743486470646361251?= X-GMAIL-MSGID: =?utf-8?q?1743486470646361251?= 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; \