Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [RFC][PATCH] gcc-runtime.inc: force libstdc++ to always use gcc4 compatible ABI
Date: Mon, 25 Jan 2016 21:10:46 -0800	[thread overview]
Message-ID: <1453785046-9017-1-git-send-email-armccurdy@gmail.com> (raw)

Experimental hack, not expected to be merged.

Without this, the http://www.cplusplus.com/reference/string/string/append/
example fails to build with -std=c++11 and it's not clear why (it's as if we
build a version of libstdc++ which supports only the old ABI but with headers
which try to use the new ABI when compiled with -std=c++11 ?). As a workaround,
force libstdc++ to provide, and default to using, the old ABI in all cases.

See also:

  https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
  https://mail.gnome.org/archives/gtkmm-list/2015-June/msg00026.html
  https://wiki.debian.org/GCC5

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-runtime.inc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index f20d298..3a476cd 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -10,6 +10,19 @@ EXTRA_OECONF_PATHS = "\
 
 EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
 
+# gcc-runtime.inc: force libstdc++ to always use gcc4 compatible ABI
+# Experimental hack. Without this, the http://www.cplusplus.com/reference/string/string/append/
+# example fails to build with -std=c++11 and it's not clear why (it's as if we
+# build a version of libstdc++ which supports only the old ABI but with headers
+# which try to use the new ABI when compiled with -std=c++11 ?). As a workaround,
+# force libstdc++ to provide, and default to using, the old ABI in all cases.
+# See also:
+# https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html
+# https://mail.gnome.org/archives/gtkmm-list/2015-June/msg00026.html
+# https://wiki.debian.org/GCC5
+#
+EXTRA_OECONF_append = " --disable-libstdcxx-dual-abi --with-default-libstdcxx-abi=gcc4-compatible"
+
 RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic \
     ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
 "
-- 
1.9.1



             reply	other threads:[~2016-01-26  5:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26  5:10 Andre McCurdy [this message]
2016-01-26 16:38 ` [RFC][PATCH] gcc-runtime.inc: force libstdc++ to always use gcc4 compatible ABI Khem Raj
2016-01-26 17:18   ` Andre McCurdy
2016-01-27  5:13     ` Khem Raj

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=1453785046-9017-1-git-send-email-armccurdy@gmail.com \
    --to=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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