Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] gcc: preserve CXXFLAGS_FOR_TARGET
Date: Fri, 11 Mar 2016 03:45:21 +0300	[thread overview]
Message-ID: <1457657122-7283-2-git-send-email-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <1457657122-7283-1-git-send-email-jcmvbkbc@gmail.com>

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.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 package/gcc/4.8.5/130-pr43538.patch | 25 +++++++++++++++++++++++++
 package/gcc/4.9.3/130-pr43538.patch | 25 +++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 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.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

  reply	other threads:[~2016-03-11  0:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  0:45 [Buildroot] [PATCH 0/2] gcc: preserve CXXFLAGS_FOR_TARGET Max Filippov
2016-03-11  0:45 ` Max Filippov [this message]
2016-03-12  9:27   ` [Buildroot] [PATCH 1/2] " Arnout Vandecappelle
2016-03-12 22:56   ` Yann E. MORIN
2016-03-13  3:18     ` Max Filippov
2016-03-13 22:23       ` Arnout Vandecappelle
2016-03-11  0:45 ` [Buildroot] [PATCH 2/2] Revert "gcc/gcc-final: pass TARGET_ABI flags to configure with --enable-cxx-flags" Max Filippov
2016-03-12  9:27   ` Arnout Vandecappelle
2016-03-12 22:56   ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457657122-7283-2-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox