Skip to contentSkip to conversation

icedtea7-native: host gcc-9, extra CFLAGS needed

PATCH In review Robert Berger 2 participants 2 messages May 8, 2020 – May 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 icedtea7-native: host gcc-9, extra CFLAGS needed

From: Robert Berger <[email protected]>

---
 recipes-core/icedtea/icedtea7-native.inc | 5 +++++
 1 file changed, 5 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +5 -0
index 8d0dc71..b9ad2bd 100644
@@ -28,6 +28,11 @@ CXX_append = " -std=gnu++98"
 # WORKAROUND: ignore errors from new compilers
 CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
 
+# oe.utils.get_host_compiler_version returns "gcc, 9.2" and we want -> "9"
+HOST_COMPILER_MAJOR="${@oe.utils.get_host_compiler_version(d)[1].split(".", 2)[0]}"
+# if compiler version 9 detected, add more CFLAGS
+CFLAGS_append = " ${@oe.utils.conditional('HOST_COMPILER_MAJOR', '9', '-Wno-error=format-overflow', '', d)}"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 inherit python3native
Signature · 1 line
2.17.1
#1 lore raw

Hi,
thanks for the patch!

I've rebased it on current master and pushed it to master-next for further testing!

regards;rl

Quoted 28 lines · Robert Berger

From: Robert Berger <[email protected]>

---
 recipes-core/icedtea/icedtea7-native.inc | 5 +++++
 1 file changed, 5 insertions(+)
recipes-core/icedtea/icedtea7-native.inc +5 -0
index 8d0dc71..b9ad2bd 100644
@@ -28,6 +28,11 @@ CXX_append = " -std=gnu++98"
 # WORKAROUND: ignore errors from new compilers
 CFLAGS_append = " -Wno-error=stringop-overflow -Wno-error=return-type"
 
+# oe.utils.get_host_compiler_version returns "gcc, 9.2" and we want -> "9"
+HOST_COMPILER_MAJOR="${@oe.utils.get_host_compiler_version(d)[1].split(".", 2)[0]}"
+# if compiler version 9 detected, add more CFLAGS
+CFLAGS_append = " ${@oe.utils.conditional('HOST_COMPILER_MAJOR', '9', '-Wno-error=format-overflow', '', d)}"
+
 inherit native java autotools pkgconfig
 inherit openjdk-build-helper
 inherit python3native
Signature · 1 line
2.17.1