summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch b/meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch
new file mode 100644
index 0000000000..6b1833ee79
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch
@@ -0,0 +1,61 @@
1From e700190743fa29ddaebd6ee075298a24b1688773 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Thu, 28 Oct 2021 11:33:40 +0100
4Subject: [PATCH 6/6] If CXXFLAGS contains something unsupported by the build
5 CXX, we see build failures (e.g. using -fmacro-prefix-map for the target).
6
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
16Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
17---
18 Makefile.in | 2 ++
19 Makefile.tpl | 2 ++
20 2 files changed, 4 insertions(+)
21
22Index: gcc-11.2.0/Makefile.in
23===================================================================
24--- gcc-11.2.0.orig/Makefile.in
25+++ gcc-11.2.0/Makefile.in
26@@ -172,6 +172,7 @@ BUILD_EXPORTS = \
27 # built for the build system to override those in BASE_FLAGS_TO_PASS.
28 EXTRA_BUILD_FLAGS = \
29 CFLAGS="$(CFLAGS_FOR_BUILD)" \
30+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
31 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
32
33 # This is the list of directories to built for the host system.
34@@ -203,6 +204,7 @@ HOST_EXPORTS = \
35 CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
36 CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
37 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
38+ CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
39 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
40 LD="$(LD)"; export LD; \
41 LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \
42Index: gcc-11.2.0/Makefile.tpl
43===================================================================
44--- gcc-11.2.0.orig/Makefile.tpl
45+++ gcc-11.2.0/Makefile.tpl
46@@ -175,6 +175,7 @@ BUILD_EXPORTS = \
47 # built for the build system to override those in BASE_FLAGS_TO_PASS.
48 EXTRA_BUILD_FLAGS = \
49 CFLAGS="$(CFLAGS_FOR_BUILD)" \
50+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
51 LDFLAGS="$(LDFLAGS_FOR_BUILD)"
52
53 # This is the list of directories to built for the host system.
54@@ -206,6 +207,7 @@ HOST_EXPORTS = \
55 CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \
56 CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \
57 CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \
58+ CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \
59 DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
60 LD="$(LD)"; export LD; \
61 LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \