From ae2952c7668db180fa6acefe82457df913342837 Mon Sep 17 00:00:00 2001 From: Evgeny Sagatov Date: Fri, 2 Feb 2024 16:01:24 +0300 Subject: Add compatability with GCC 12.x Fixes build for kas 4.2 and Yocto Project 4.3.2 Signed-off-by: Evgeny Sagatov Backport from 8c0c9f13cb89008f080fded0ca435f388e97bd7b Signed-off-by: Tim Orling --- recipes-core/icedtea/icedtea7-native.inc | 5 ++--- recipes-core/openjdk/openjdk-7-common.inc | 3 +++ recipes-core/openjdk/openjdk-8-common.inc | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc index 0f317bb..d6f8fd7 100644 --- a/recipes-core/icedtea/icedtea7-native.inc +++ b/recipes-core/icedtea/icedtea7-native.inc @@ -21,9 +21,8 @@ CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', '', ' -DHEADLESS=t # 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. -CFLAGS:append = " -fno-tree-dse" -CXXFLAGS:append = " -fno-tree-dse" -CXX:append = " -std=gnu++98" +CFLAGS:append = " -std=gnu++98 -fno-tree-dse -fno-tree-vectorize" +CXXFLAGS:append = " -std=gnu++98 -fno-tree-dse" # WORKAROUND: ignore errors from new compilers CFLAGS:append = " -Wno-error=stringop-overflow -Wno-error=return-type" diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc index 0435233..cba1ea6 100644 --- a/recipes-core/openjdk/openjdk-7-common.inc +++ b/recipes-core/openjdk/openjdk-7-common.inc @@ -459,3 +459,6 @@ ALTERNATIVE_LINK_NAME[javac] = "${bindir}/javac" ALTERNATIVE_LINK_NAME[keytool] = "${bindir}/keytool" ALTERNATIVE_PRIORITY = "50" + +# canon-prefix-map doesn't exist in gcc 12.x +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc index 16e3816..82bf31e 100644 --- a/recipes-core/openjdk/openjdk-8-common.inc +++ b/recipes-core/openjdk/openjdk-8-common.inc @@ -194,3 +194,6 @@ BUILD_CXXFLAGS:append = " ${GLOBAL_FLAGS}" # flags for -cross TARGET_CFLAGS:append = " ${GLOBAL_FLAGS}" TARGET_CXXFLAGS:append = " ${GLOBAL_FLAGS}" + +# canon-prefix-map doesn't exist in gcc 12.x +DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map" -- cgit v1.2.3-54-g00ecf