[oe] [meta-java][PATCH] icedtea7-native: make GCC 6 happy

Dan McGregor danismostlikely at gmail.com
Mon Jun 20 14:02:43 UTC 2016


From: Daniel McGregor <daniel.mcgregor at vecima.com>

GCC 6 sets the default C++ standard to C++14 and introduces dead store
elimination by default. icedtea7 is not ready for either of these
changes, so just set the C++ standard back to gnu++98 and disable dead
store elimination.

Signed-off-by: Daniel McGregor <daniel.mcgregor at vecima.com>
Signed-off-by: Dan McGregor <dan.mcgregor at usask.ca>
---
 recipes-core/icedtea/icedtea7-native.inc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index d624b7a..fa78991 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -17,6 +17,14 @@ PACKAGECONFIG[x11] = ",--disable-headful,libx11-native xproto-native libxt-nativ
 OEMAKE_BUILD_HEADLESS_ONLY = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', 'BUILD_HEADLESS_ONLY=1', d)}"
 CFLAGS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ' -DHEADLESS=true', d)}"
 
+# CXXFLAGS doesn't make it to all calls.
+# Set the C++ standard version for C too.
+CFLAGS_append = " -std=gnu++98 -fno-tree-dse -Wno-error"
+# Disable dead store elimination and set C++ standard to C++98.
+# There are dead stores in the JVM that would be pretty hard to
+# remove, so disable the optimisation in the compiler.
+CXXFLAGS_append = " -std=gnu++98 -fno-tree-dse -Wno-error"
+
 inherit native java autotools pkgconfig
 
 JAVA_HOME[unexport] = "1"
-- 
2.9.0




More information about the Openembedded-devel mailing list