As nobody should use older versions of GCC anymore this patch drops all
version dependent workarounds and requiers host gcc >=6 for building
openjdk-8.

Signed-off-by: Richard Leitner <[email protected]>
Tested-by: Jacob Kroon <[email protected]>
---
 README                                    |  2 +-
 recipes-core/openjdk/openjdk-8-common.inc | 22 ++++++++--------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/README b/README
index d28da02..f97378d 100644
--- a/README
+++ b/README
@@ -133,5 +133,5 @@ BBLAYERS ?= " \
 
 Build host dependencies
 -----------------------
- - gcc with c++14 support
+ - gcc >= v6
  - libstdc++ static
diff --git a/recipes-core/openjdk/openjdk-8-common.inc 
b/recipes-core/openjdk/openjdk-8-common.inc
index 5228338..c78bb2a 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -170,20 +170,14 @@ EXTRA_OECONF_append = "\
 "
 
 # Since v6, GCC sets the default C++ standard to C++14 and introduces
-# dead store elimination by default. OpenJDK 8 is not ready for either
-# of these changes.
-FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
-FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
-FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
-FLAGS_GCC9 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
-FLAGS_GCC10 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
-
-# GCC 10 defaults to -fno-common, but OpenJDK 8 is not ready for this.
-FLAGS_GCC10_append = " -fcommon"
+# dead store elimination by default.
+# Since v10, GCC defaults to -fno-common.
+# OpenJDK 8 is not ready for either of these changes.
+GLOBAL_FLAGS = "-fno-lifetime-dse -fno-delete-null-pointer-checks -fcommon"
 
 # flags for -native, and for bits that need a host-tool during -cross
-BUILD_CFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}"
-BUILD_CXXFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}"
+BUILD_CFLAGS_append = " ${GLOBAL_FLAGS}"
+BUILD_CXXFLAGS_append = " ${GLOBAL_FLAGS}"
 # flags for -cross
-TARGET_CFLAGS_append = " ${@openjdk_build_helper_get_target_cflags(d)}"
-TARGET_CXXFLAGS_append = " ${@openjdk_build_helper_get_target_cflags(d)}"
+TARGET_CFLAGS_append = " ${GLOBAL_FLAGS}"
+TARGET_CXXFLAGS_append = " ${GLOBAL_FLAGS}"
-- 
2.26.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84222): 
https://lists.openembedded.org/g/openembedded-devel/message/84222
Mute This Topic: https://lists.openembedded.org/mt/74023477/21656
Group Owner: [email protected]
Unsubscribe: 
https://lists.openembedded.org/g/openembedded-devel/leave/8024792/1994799631/xyzzy
  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to