From: Max Filippov Date: Sun, 13 Mar 2016 03:45:16 +0000 (+0300) Subject: gcc: preserve CXXFLAGS_FOR_TARGET X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f67a4f50e2ace3a2;p=buildroot.git gcc: preserve CXXFLAGS_FOR_TARGET gcc-4.7.x, gcc-4.8.x and gcc-4.9.x don't propagate CXXFLAGS_FOR_TARGET to CXXFLAGS for libstdc++ build. As a result libstdc++ is built without TARGET_CFLAGS and may fail to link with applications using it, see e.g. http://autobuild.buildroot.net/results/81a3bca5cbcf789c7ce1aa221a6a4154dd7c3917/ Instead of passing TARGET_ABI or TARGET_CFLAGS for libstdc++ in --enable-cxx-flags parameter backport the patch that fixes propagation of CXXFLAGS_FOR_TARGET to CXXFLAGS. This issue is fixed in gcc-5.x Signed-off-by: Max Filippov Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Reviewed-by: "Yann E. MORIN" Signed-off-by: Peter Korsgaard --- diff --git a/package/gcc/4.7.4/130-pr43538.patch b/package/gcc/4.7.4/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/4.7.4/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/4.8.5/130-pr43538.patch b/package/gcc/4.8.5/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/4.8.5/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/4.9.3/130-pr43538.patch b/package/gcc/4.9.3/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/4.9.3/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 +