From e31e8b593ffab2ce0f806666efbe1553e55f8229 Mon Sep 17 00:00:00 2001 From: Robert Berger Date: Fri, 8 May 2020 21:08:32 +0300 Subject: icedtea7-native: host gcc-9, extra CFLAGS needed Signed-off-by: Robert Berger Signed-off-by: Richard Leitner --- recipes-core/icedtea/icedtea7-native.inc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'recipes-core/icedtea') diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index b0b9419..a5daa7c 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc @@ -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)}" + # Explicitly pass -fcommon since GCC 10 defaults to -fno-common for C sources CFLAGS_append = " -fcommon" -- cgit v1.2.3-54-g00ecf