summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc/0006-If-CXXFLAGS-contains-something-unsupported-by-the-bu.patch
blob: 98a1bb2a66821bd92454b6302a9ddb5f4af948aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From e700190743fa29ddaebd6ee075298a24b1688773 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Thu, 28 Oct 2021 11:33:40 +0100
Subject: [PATCH 6/6] If CXXFLAGS contains something unsupported by the build
 CXX, we see build failures (e.g. using -fmacro-prefix-map for the target).

Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these errors.

2021-10-28 Richard Purdie <richard.purdie@linuxfoundation.org>

ChangeLog:

    * Makefile.in: Regenerate.
    * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 Makefile.in  | 2 ++
 Makefile.tpl | 2 ++
 2 files changed, 4 insertions(+)

Upstream-Status: Pending [should be submittable]

Index: gcc-11.2.0/Makefile.in
===================================================================
--- gcc-11.2.0.orig/Makefile.in
+++ gcc-11.2.0/Makefile.in
@@ -172,6 +172,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.
@@ -203,6 +204,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; \
 	LD="$(LD)"; export LD; \
 	LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \
Index: gcc-11.2.0/Makefile.tpl
===================================================================
--- gcc-11.2.0.orig/Makefile.tpl
+++ gcc-11.2.0/Makefile.tpl
@@ -175,6 +175,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.
@@ -206,6 +207,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; \
 	LD="$(LD)"; export LD; \
 	LDFLAGS="$(STAGE1_LDFLAGS) $(LDFLAGS)"; export LDFLAGS; \