Skip to contentSkip to conversation

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

PATCH Superseded Robert Berger 1 participant 2 messages May 8, 2020 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

---
 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

A message that is not in the archive (sent off-list or not yet received): 20200508161006.GA8325@brokenbit

#2 lore raw

Hi,

My comments are in-line.

Quoted 6 lines · Richard Leitner

Hi Robert,
thanks for the patch!

One question regarding your E-Mail Addresses: Are you sure <[email protected]> should be your author address, or should it be <[email protected]> ?

It should be

From: Robert Berger <[email protected]>

I just sent out v2 - hopefully it's OK now.

please check

Quoted 2 lines

regards;rl

Regards,

Robert

Quoted 23 lines · Robert Berger
Quoted 21 lines
---
  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