[Buildroot] [git commit branch/2021.05.x] package/openjdk: needs host gcc >= 4.9

Peter Korsgaard peter at korsgaard.com
Mon Sep 13 18:06:10 UTC 2021


commit: https://git.buildroot.net/buildroot/commit/?id=84b4f533ce03187ade81f77857d0e5016a4c4af3
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.05.x

openjdk needs host gcc >= 4.9 since bump to version 16.0.1+9 in commit
057e27029c9811ba8cc4922e30cc3878bed98807 and
https://github.com/openjdk/jdk/commit/2a8f92e7e71f7c1ed4010fa31f4b413758c8752a:

configure: Using gcc BuildC compiler version 4.8.5 [cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)]
configure: Using gcc BuildC++ compiler version 4.8.5 [g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)]
configure: Using gcc build linker version 2.27 [GNU ld version 2.27-44.base.el7]

[...]

g++: error: unrecognized command line option '-std=c++14'

Add a dependency on host gcc >= 4.9 for the OpenJDK 16 version only, so
that users can still use OpenJDK 11 on older distributions.

Fixes:
 - http://autobuild.buildroot.org/results/7072308d148ccb8237180729551df65c87a76f11

Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
[yann.morin.1998 at free.fr: limit the dependency to OpenJDK 16]
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
(cherry picked from commit 0e5a1f7757cbdc0c513e64e0652d7a132a01f092)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/openjdk/Config.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/openjdk/Config.in b/package/openjdk/Config.in
index f2b7f5ffd7..a0d04e5725 100644
--- a/package/openjdk/Config.in
+++ b/package/openjdk/Config.in
@@ -20,7 +20,7 @@ config BR2_PACKAGE_OPENJDK
 	depends on !BR2_STATIC_LIBS # glibc
 	depends on BR2_INSTALL_LIBSTDCPP # cups
 	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib, cups, libusb
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb, C++14 for OpenJDK16
 	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_USE_MMU # cups
 	depends on BR2_PACKAGE_XORG7
@@ -60,6 +60,10 @@ config BR2_OPENJDK_VERSION_LTS
 
 config BR2_OPENJDK_VERSION_LATEST
 	bool "latest (OpenJDK 16)"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # C++14
+
+comment "OpenJDK 16 needs a host gcc >= 4.9"
+	depends on !BR2_HOST_GCC_AT_LEAST_4_9 # C++14
 
 endchoice
 


More information about the buildroot mailing list