blob: 7f807a991c0b68107739a8439dca923eec1e4b11 [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001From 2c2a92573598ddbc33c023fe5d499191491fb523 Mon Sep 17 00:00:00 2001
Brad Bishopbec4ebc2022-08-03 09:55:16 -04002From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 28 Oct 2021 11:33:40 +0100
Patrick Williams2194f502022-10-16 14:26:09 -05004Subject: [PATCH] If CXXFLAGS contains something unsupported by the build CXX,
5 we see build failures (e.g. using -fmacro-prefix-map for the target).
Brad Bishopbec4ebc2022-08-03 09:55:16 -04006
7Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these errors.
8
92021-10-28 Richard Purdie <richard.purdie@linuxfoundation.org>
10
11ChangeLog:
12
13 * Makefile.in: Regenerate.
14 * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides
15
Patrick Williams2194f502022-10-16 14:26:09 -050016Upstream-Status: Pending [should be submittable]
17
Brad Bishopbec4ebc2022-08-03 09:55:16 -040018Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Patrick Williams2194f502022-10-16 14:26:09 -050019Signed-off-by: Khem Raj <raj.khem@gmail.com>
Brad Bishopbec4ebc2022-08-03 09:55:16 -040020---
21 Makefile.in | 2 ++
22 Makefile.tpl | 2 ++
23 2 files changed, 4 insertions(+)
24
Patrick Williams2194f502022-10-16 14:26:09 -050025diff --git a/Makefile.in b/Makefile.in
26index 33476d53327..b949dffee0e 100644
27--- a/Makefile.in
28+++ b/Makefile.in
29@@ -176,6 +176,7 @@ BUILD_EXPORTS = \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040030 # built for the build system to override those in BASE_FLAGS_TO_PASS.
31 EXTRA_BUILD_FLAGS = \
32 CFLAGS="$(CFLAGS_FOR_BUILD)" \
33+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
34 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
35
36 # This is the list of directories to built for the host system.
Patrick Williams2194f502022-10-16 14:26:09 -050037@@ -207,6 +208,7 @@ HOST_EXPORTS = \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040038 CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
39 CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
40 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
41+ CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
42 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
Patrick Williams2194f502022-10-16 14:26:09 -050043 DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040044 LD="$(LD)"; export LD; \
Patrick Williams2194f502022-10-16 14:26:09 -050045diff --git a/Makefile.tpl b/Makefile.tpl
46index e39d85d1109..d8520cbb164 100644
47--- a/Makefile.tpl
48+++ b/Makefile.tpl
49@@ -179,6 +179,7 @@ BUILD_EXPORTS = \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040050 # built for the build system to override those in BASE_FLAGS_TO_PASS.
51 EXTRA_BUILD_FLAGS = \
52 CFLAGS="$(CFLAGS_FOR_BUILD)" \
53+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
54 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
55
56 # This is the list of directories to built for the host system.
Patrick Williams2194f502022-10-16 14:26:09 -050057@@ -210,6 +211,7 @@ HOST_EXPORTS = \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040058 CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
59 CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
60 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
61+ CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
62 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
Patrick Williams2194f502022-10-16 14:26:09 -050063 DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \
Brad Bishopbec4ebc2022-08-03 09:55:16 -040064 LD="$(LD)"; export LD; \