commit:     52d8f44f45d244184d737cec5a26a1754f877e75
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 15 18:40:09 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Sep 15 18:40:09 2018 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=52d8f44f

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.

Bug: https://bugs.gentoo.org/581406
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 5.4.0/gentoo/98_all_respect-build-cxxflags.patch  | 39 +++++++++++++++++++++++
 5.4.0/gentoo/README.history                       |  2 ++
 6.4.0/gentoo/102_all_respect-build-cxxflags.patch | 39 +++++++++++++++++++++++
 6.4.0/gentoo/README.history                       |  1 +
 7.3.0/gentoo/100_all_respect-build-cxxflags.patch | 39 +++++++++++++++++++++++
 7.3.0/gentoo/README.history                       |  1 +
 8.2.0/gentoo/102_all_respect-build-cxxflags.patch | 39 +++++++++++++++++++++++
 8.2.0/gentoo/README.history                       |  1 +
 8 files changed, 161 insertions(+)

diff --git a/5.4.0/gentoo/98_all_respect-build-cxxflags.patch 
b/5.4.0/gentoo/98_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/5.4.0/gentoo/98_all_respect-build-cxxflags.patch
@@ -0,0 +1,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
+@@ -170,6 +170,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.
+@@ -710,6 +711,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
+@@ -172,6 +172,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.

diff --git a/5.4.0/gentoo/README.history b/5.4.0/gentoo/README.history
index 4845af8..e372386 100644
--- a/5.4.0/gentoo/README.history
+++ b/5.4.0/gentoo/README.history
@@ -1,3 +1,5 @@
+1.10           TODO
+       + 98_all_respect-build-cxxflags.patch
 1.9            27 Aug 2018
        + 96_all_libsanitizer-avoidustat.h-glibc-2.28-part-1.patch
        + 97_all_libsanitizer-avoidustat.h-glibc-2.28-part-2.patch

diff --git a/6.4.0/gentoo/102_all_respect-build-cxxflags.patch 
b/6.4.0/gentoo/102_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/6.4.0/gentoo/102_all_respect-build-cxxflags.patch
@@ -0,0 +1,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
+@@ -170,6 +170,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.
+@@ -710,6 +711,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
+@@ -172,6 +172,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.

diff --git a/6.4.0/gentoo/README.history b/6.4.0/gentoo/README.history
index 2294b26..012b265 100644
--- a/6.4.0/gentoo/README.history
+++ b/6.4.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.7            TODO
        + 101_all_x32-fix-eh-return-address.patch
+       + 102_all_respect-build-cxxflags.patch
 1.6            18 Aug 2018
        + 100_all_isl-include.patch
 1.5            17 Aug 2018

diff --git a/7.3.0/gentoo/100_all_respect-build-cxxflags.patch 
b/7.3.0/gentoo/100_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/7.3.0/gentoo/100_all_respect-build-cxxflags.patch
@@ -0,0 +1,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
+@@ -170,6 +170,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.
+@@ -710,6 +711,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
+@@ -172,6 +172,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.

diff --git a/7.3.0/gentoo/README.history b/7.3.0/gentoo/README.history
index 7070e8f..1c3ac12 100644
--- a/7.3.0/gentoo/README.history
+++ b/7.3.0/gentoo/README.history
@@ -1,6 +1,7 @@
 1.6            TODO
        + 98_all_msp430-partial-int.patch
        + 99_all_x32-fix-eh-return-address.patch
+       + 100_all_respect-build-cxxflags.patch
 1.6            18 Aug 2018
        + 97_all_isl-include.patch
 1.5            17 Aug 2018

diff --git a/8.2.0/gentoo/102_all_respect-build-cxxflags.patch 
b/8.2.0/gentoo/102_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..14139ea
--- /dev/null
+++ b/8.2.0/gentoo/102_all_respect-build-cxxflags.patch
@@ -0,0 +1,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
+@@ -170,6 +170,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.
+@@ -710,6 +711,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
+@@ -172,6 +172,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.

diff --git a/8.2.0/gentoo/README.history b/8.2.0/gentoo/README.history
index 8daa563..b0c5ea5 100644
--- a/8.2.0/gentoo/README.history
+++ b/8.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.3            TODO
        + 101_all_x32-fix-eh-return-address.patch
+       + 102_all_respect-build-cxxflags.patch
 1.2            12 Aug 2018
        - 100_all-isl-include.patch
        + 100_all_isl-include.patch

Reply via email to