aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo@foundries.io>2018-08-16 20:11:07 -0300
committerKhem Raj <raj.khem@gmail.com>2018-08-19 16:09:28 -0700
commitb8330672336994336526bfc8ac118b30eaaacd73 (patch)
tree3c73dc1d657a94eab18807da243ae5580e22f61a
parent5577f91f09d54f1ad06b74521c3a2334b75770d0 (diff)
downloadmeta-openembedded-contrib-b8330672336994336526bfc8ac118b30eaaacd73.tar.gz
meta-openembedded-contrib-b8330672336994336526bfc8ac118b30eaaacd73.tar.bz2
meta-openembedded-contrib-b8330672336994336526bfc8ac118b30eaaacd73.zip
mozjs: disable null pointer optimization with GCC >= 6
Mozjs fails to start on several architectures due broken build optimizations when built with GCC >= 6. Set -fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks to both CFLAGS and CXXFLAGS as workaround (flags also used by Firefox and Fedora). Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb b/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb
index fe9698fbf8..626522eb8e 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb
@@ -32,6 +32,11 @@ CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
DEPENDS += "nspr zlib"
+# Disable null pointer optimization in gcc >= 6
+# https://bugzilla.redhat.com/show_bug.cgi?id=1328045
+CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
+CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
+
# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
--target=${TARGET_SYS} \