Skip to contentSkip to conversation

icedtea7-native: make GCC 6 happy

PATCH Superseded Dan McGregor 2 participants 3 messages Jun 20, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 icedtea7-native: make GCC 6 happy

From: Daniel McGregor <[email protected]>

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.

---
 recipes-core/icedtea/icedtea7-native.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +8 -0
index d624b7a..fa78991 100644
@@ -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"
Signature · 1 line
2.9.0
#1 lore raw
Quoted 18 lines · Dan McGregor

From: Daniel McGregor <[email protected]>

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.

---
 recipes-core/icedtea/icedtea7-native.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +0 -0
index d624b7a..fa78991 100644

recipes-core/icedtea/icedtea7-native.inc PACKAGECONFIG[x11] = ",--disable-headful,libx11-native xproto-native libxt-nativ · line 22

Quoted 6 lines
recipes-core/icedtea/icedtea7-native.inc +3 -0
@@ -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"

this is interesting. what happens to C files ? I see that C++ files may get the right options if they are using CFLAGS in makery which should be fixed to use CXXFLAGS IMO

Quoted 16 lines
recipes-core/icedtea/icedtea7-native.inc +5 -1
+# 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

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 22 lines · Khem Raj
Quoted 21 lines · Dan McGregor

From: Daniel McGregor <[email protected]>

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.

---
 recipes-core/icedtea/icedtea7-native.inc | 8 ++++++++
 1 file changed, 8 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +0 -0
index d624b7a..fa78991 100644
@@ -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)}"
 
Quoted 8 lines

recipes-core/icedtea/icedtea7-native.inc PACKAGECONFIG[x11] = ",--disable-headful,libx11-native xproto-native libxt-nativ · line 22

Quoted 3 lines
recipes-core/icedtea/icedtea7-native.inc +3 -0
+# 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"

this is interesting. what happens to C files ? I see that C++ files may get the right options if they are using CFLAGS in makery which should be fixed to use CXXFLAGS IMO

C files throw a warning about the C++ standard not being appropriate for C files.

That being said, I found a better way to do this, and a V2 is coming, complete with fixes for openjdk-8 and openjdk-8-native.

Quoted 21 lines
Quoted 11 lines
recipes-core/icedtea/icedtea7-native.inc +5 -1
+# 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

Quoted 5 lines

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel