aboutsummaryrefslogtreecommitdiff
blob: 1f9a774424dd4e56dfa063c3453cd72e85da35bc (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
Pass CXXFLAGS as CXXFLAGS_FOR_BUILD to stage1.

Fixes build failure when CXXFLAGS contains
TARGET-specific flags.

Tested on x86_64-pc-linux-gnu host as:
    # CFLAGS='-O2 -mfpu=neon-vfpv4' CXXFLAGS='-O2 -mfpu=neon-vfpv4' \
        armv7a-unknown-linux-gnueabihf-emerge -v1 sys-devel/gcc --quiet-build=n

Fix by Peter Levine.
https://bugs.gentoo.org/581406
--- a/Makefile.in
+++ b/Makefile.in
@@ -176,6 +176,7 @@
 # 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.
@@ -842,6 +843,7 @@
 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
 	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
 	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
+	"CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
 	"EXPECT=$(EXPECT)" \
 	"FLEX=$(FLEX)" \
 	"INSTALL=$(INSTALL)" \
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -179,6 +179,7 @@
 # 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.