summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-11-22 17:41:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-28 15:49:15 +0000
commit5fd4cada2e49a0a12f54b8e37b7f18c44101457f (patch)
tree08257633596fe93043dc5d6e0e35a9300532f102 /meta/conf
parentd351c87452a84d51a06ed1a51c18ccd994169abf (diff)
downloadpoky-5fd4cada2e49a0a12f54b8e37b7f18c44101457f.tar.gz
conf: add C++ flags for uninative interoperatility
Create a common include file for compiler flags which allow native binaries to be interoperable on a wide range of hosts. In particular the C++ ABI is problematic so choose the CXX11 version to allow interoperation between gcc4 and gcc5 based hosts. Moving this to a common include instead of uninative.bbclass allows uninative to be configured later and used in the eSDK (where its mandatory) even if the base configuration doesn't enable uninative by default (e.g. nodistro in OE-Core). [ YOCTO #10645 ] (From OE-Core rev: 60c912ae9306532bdd4c5e09a65863ee77c12f43) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/distro/defaultsetup.conf3
-rw-r--r--meta/conf/distro/include/uninative-flags.inc9
2 files changed, 11 insertions, 1 deletions
diff --git a/meta/conf/distro/defaultsetup.conf b/meta/conf/distro/defaultsetup.conf
index 71c65b1462..aa21345a1c 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -9,6 +9,8 @@ require conf/distro/include/tcmode-${TCMODE}.inc
9TCLIBC ?= "glibc" 9TCLIBC ?= "glibc"
10require conf/distro/include/tclibc-${TCLIBC}.inc 10require conf/distro/include/tclibc-${TCLIBC}.inc
11 11
12require conf/distro/include/uninative-flags.inc
13
12# Allow single libc distros to disable this code 14# Allow single libc distros to disable this code
13TCLIBCAPPEND ?= "-${TCLIBC}" 15TCLIBCAPPEND ?= "-${TCLIBC}"
14TMPDIR .= "${TCLIBCAPPEND}" 16TMPDIR .= "${TCLIBCAPPEND}"
@@ -20,4 +22,3 @@ PACKAGE_CLASSES ?= "package_ipk"
20INHERIT_BLACKLIST = "blacklist" 22INHERIT_BLACKLIST = "blacklist"
21INHERIT_DISTRO ?= "debian devshell sstate license" 23INHERIT_DISTRO ?= "debian devshell sstate license"
22INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}" 24INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} ${INHERIT_BLACKLIST}"
23
diff --git a/meta/conf/distro/include/uninative-flags.inc b/meta/conf/distro/include/uninative-flags.inc
new file mode 100644
index 0000000000..e9f82c39ea
--- /dev/null
+++ b/meta/conf/distro/include/uninative-flags.inc
@@ -0,0 +1,9 @@
1# https://wiki.debian.org/GCC5
2# We may see binaries built with gcc5 run or linked into gcc4 environment
3# so use the older libstdc++ standard for now until we don't support gcc4
4# on the host system.
5BUILD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"
6
7# icu configure defaults to CXX11 if no -std= option is passed in CXXFLAGS
8# therefore pass one
9BUILD_CXXFLAGS_append_pn-icu-native = " -std=c++98"