* [Buildroot] [PATCH v2 0/2] gcc: preserve CXXFLAGS_FOR_TARGET
@ 2016-03-13 3:45 Max Filippov
2016-03-13 3:45 ` [Buildroot] [PATCH v2 1/2] " Max Filippov
2016-03-13 3:45 ` [Buildroot] [PATCH v2 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags" Max Filippov
0 siblings, 2 replies; 5+ messages in thread
From: Max Filippov @ 2016-03-13 3:45 UTC (permalink / raw)
To: buildroot
Hello,
this series backports gcc fix that preserves CXXFLAGS_FOR_TARGET and
reverts related xtensa-specific workaround. See discussion at
https://patchwork.ozlabs.org/patch/479074/
Changes v1->v2:
- backport to 4.7.x as well;
- mention that the issue is fixed in 5.x
Max Filippov (2):
gcc: preserve CXXFLAGS_FOR_TARGET
Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with
--enable-cxx-flags"
package/gcc/4.7.4/130-pr43538.patch | 25 +++++++++++++++++++++++++
package/gcc/4.8.5/130-pr43538.patch | 25 +++++++++++++++++++++++++
package/gcc/4.9.3/130-pr43538.patch | 25 +++++++++++++++++++++++++
package/gcc/gcc-final/gcc-final.mk | 4 ----
4 files changed, 75 insertions(+), 4 deletions(-)
create mode 100644 package/gcc/4.7.4/130-pr43538.patch
create mode 100644 package/gcc/4.8.5/130-pr43538.patch
create mode 100644 package/gcc/4.9.3/130-pr43538.patch
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] gcc: preserve CXXFLAGS_FOR_TARGET
2016-03-13 3:45 [Buildroot] [PATCH v2 0/2] gcc: preserve CXXFLAGS_FOR_TARGET Max Filippov
@ 2016-03-13 3:45 ` Max Filippov
2016-03-15 22:15 ` Peter Korsgaard
2016-03-13 3:45 ` [Buildroot] [PATCH v2 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags" Max Filippov
1 sibling, 1 reply; 5+ messages in thread
From: Max Filippov @ 2016-03-13 3:45 UTC (permalink / raw)
To: buildroot
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 <jcmvbkbc@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1->v2:
- backport to 4.7.x as well;
- mention that the issue is fixed in 5.x
package/gcc/4.7.4/130-pr43538.patch | 25 +++++++++++++++++++++++++
package/gcc/4.8.5/130-pr43538.patch | 25 +++++++++++++++++++++++++
package/gcc/4.9.3/130-pr43538.patch | 25 +++++++++++++++++++++++++
3 files changed, 75 insertions(+)
create mode 100644 package/gcc/4.7.4/130-pr43538.patch
create mode 100644 package/gcc/4.8.5/130-pr43538.patch
create mode 100644 package/gcc/4.9.3/130-pr43538.patch
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 0000000..19e57bb
--- /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 <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 25 Apr 2014 08:03:08 +0000
+Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
+
+ PR target/43538
+ * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 209784 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ 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 0000000..19e57bb
--- /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 <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 25 Apr 2014 08:03:08 +0000
+Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
+
+ PR target/43538
+ * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 209784 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ 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 0000000..19e57bb
--- /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 <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Fri, 25 Apr 2014 08:03:08 +0000
+Subject: [PATCH] 2014-04-25 Marc Glisse <marc.glisse@inria.fr>
+
+ PR target/43538
+ * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk at 209784 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+---
+ 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
+
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags"
2016-03-13 3:45 [Buildroot] [PATCH v2 0/2] gcc: preserve CXXFLAGS_FOR_TARGET Max Filippov
2016-03-13 3:45 ` [Buildroot] [PATCH v2 1/2] " Max Filippov
@ 2016-03-13 3:45 ` Max Filippov
2016-03-15 22:15 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Max Filippov @ 2016-03-13 3:45 UTC (permalink / raw)
To: buildroot
This reverts commit 2dcab526a97d1dbcb73c3cd578e5bf2853853a10.
Now that gcc correctly propagates CXXFLAGS_FOR_TARGET for libstdc++
build this is no longer needed.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/gcc/gcc-final/gcc-final.mk | 4 ----
1 file changed, 4 deletions(-)
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index dbdb615..69fdc0c 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -195,8 +195,4 @@ endef
HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_USR_LIBS
endif
-ifeq ($(BR2_xtensa),y)
-HOST_GCC_FINAL_CONF_OPTS += --enable-cxx-flags="$(TARGET_ABI)"
-endif
-
$(eval $(host-autotools-package))
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/2] gcc: preserve CXXFLAGS_FOR_TARGET
2016-03-13 3:45 ` [Buildroot] [PATCH v2 1/2] " Max Filippov
@ 2016-03-15 22:15 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2016-03-15 22:15 UTC (permalink / raw)
To: buildroot
>>>>> "Max" == Max Filippov <jcmvbkbc@gmail.com> writes:
> 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 <jcmvbkbc@gmail.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> Changes v1->v2:
> - backport to 4.7.x as well;
> - mention that the issue is fixed in 5.x
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags"
2016-03-13 3:45 ` [Buildroot] [PATCH v2 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags" Max Filippov
@ 2016-03-15 22:15 ` Peter Korsgaard
0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2016-03-15 22:15 UTC (permalink / raw)
To: buildroot
>>>>> "Max" == Max Filippov <jcmvbkbc@gmail.com> writes:
> This reverts commit 2dcab526a97d1dbcb73c3cd578e5bf2853853a10.
> Now that gcc correctly propagates CXXFLAGS_FOR_TARGET for libstdc++
> build this is no longer needed.
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-15 22:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-13 3:45 [Buildroot] [PATCH v2 0/2] gcc: preserve CXXFLAGS_FOR_TARGET Max Filippov
2016-03-13 3:45 ` [Buildroot] [PATCH v2 1/2] " Max Filippov
2016-03-15 22:15 ` Peter Korsgaard
2016-03-13 3:45 ` [Buildroot] [PATCH v2 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags" Max Filippov
2016-03-15 22:15 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox