Skip to contentSkip to conversation

package/openjdk{-bin}: add OpenJDK25 and configure it as latest

PATCH New Thomas Devoogdt 1 participant 1 message Feb 21

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/openjdk{-bin}: add OpenJDK25 and configure it as latest

OpenJDK 25 is the latest release.
See: https://endoflife.date/oracle-jdk

- BR2_OPENJDK_VERSION_LATEST is now set to 25.

- Add version-specific patches for 25.0.2+10:
- 0001: Add ARCv2 ISA processors support to Zero
- 0002: Compile OpenJDK in headless mode without requirements
- 0003: Fix ambiguous cmp() overload in aarch64 macro assembler (older GCC 6.x compatibility)
- 0004: Fix constexpr on non-literal type in Shenandoah GC (older GCC 6.x compatibility)

- Add -fpermissive to fix template definition error with older GCC.

- Update HOST_OPENJDK_BIN_VERSION for OpenJDK 25.

- Update the expectedVersion variable in JniTest.java from 0x00150000 (JNI 21) to 0x00180000 (JNI 24/25).

Tested with:

$ ./support/testing/run-tests -o ~/br-test-py/ -d ~/br-test-dl/ \
    tests.package.test_openjdk.TestOpenJdk
---
 .../openjdk-bin/25.0.2_10/openjdk-bin.hash    |   7 +
 package/openjdk-bin/openjdk-bin.mk            |   6 +-
 ...ARCv2-ISA-processors-support-to-Zero.patch | 109 +++++++++++++
 ...OpenJDK-in-headless-mode-without-req.patch | 144 ++++++++++++++++++
 ...spot-aarch64-macro-assembler-fix-cmp.patch |  43 ++++++
 ...ot-share-gc-shenandoah-fix-constexpr.patch |  42 +++++
 package/openjdk/Config.in                     |   7 +-
 package/openjdk/openjdk.hash                  |   1 +
 package/openjdk/openjdk.mk                    |  10 +-
 .../package/openjdk-jni-test/JniTest.java     |   2 +-
 10 files changed, 363 insertions(+), 8 deletions(-)
 create mode 100644 package/openjdk-bin/25.0.2_10/openjdk-bin.hash
 create mode 100644 package/openjdk/25.0.2+10/0001-Add-ARCv2-ISA-processors-support-to-Zero.patch
 create mode 100644 package/openjdk/25.0.2+10/0002-8376684-Compile-OpenJDK-in-headless-mode-without-req.patch
 create mode 100644 package/openjdk/25.0.2+10/0003-src-hotspot-aarch64-macro-assembler-fix-cmp.patch
 create mode 100644 package/openjdk/25.0.2+10/0004-src-hotspot-share-gc-shenandoah-fix-constexpr.patch
package/openjdk-bin/25.0.2_10/openjdk-bin.hash new file +7 -0
new file mode 100644
index 00000000000..42892b1e6ce
@@ -0,0 +1,7 @@
+# From https://github.com/adoptium/temurin25-binaries/releases
+sha256  987387933b64b9833846dee373b640440d3e1fd48a04804ec01a6dbf718e8ab8  OpenJDK25U-jdk_x64_linux_hotspot_25.0.2_10.tar.gz
+sha256  a9d73e711d967dc44896d4f430f73a68fd33590dabc29a7f2fb9f593425b854c  OpenJDK25U-jdk_aarch64_linux_hotspot_25.0.2_10.tar.gz
+
+# Locally calculated
+sha256  4b9abebc4338048a7c2dc184e9f800deb349366bdf28eb23c2677a77b4c87726  legal/java.prefs/LICENSE
+sha256  75292f03bf23d3db7c985aecc191029b93883200721ed23ed34a2e601463df33  legal/java.prefs/ASSEMBLY_EXCEPTION
package/openjdk-bin/openjdk-bin.mk +5 -1
index e6c74cf6d8c..a753139d607 100644
@@ -4,7 +4,11 @@
 #
 ################################################################################
 
-ifeq ($(BR2_PACKAGE_OPENJDK_VERSION_21),y)
+ifeq ($(BR2_PACKAGE_OPENJDK_VERSION_25),y)
+HOST_OPENJDK_BIN_VERSION_MAJOR = 25
+HOST_OPENJDK_BIN_VERSION_MINOR = 0.2
+HOST_OPENJDK_BIN_VERSION_BUILD = 10
+else ifeq ($(BR2_PACKAGE_OPENJDK_VERSION_21),y)
 HOST_OPENJDK_BIN_VERSION_MAJOR = 21
 HOST_OPENJDK_BIN_VERSION_MINOR = 0.4
 HOST_OPENJDK_BIN_VERSION_BUILD = 7
package/openjdk/25.0.2+10/0001-Add-ARCv2-ISA-processors-support-to-Zero.patch new file +109 -0

109 lines not on this page · raw message

package/openjdk/25.0.2+10/0002-8376684-Compile-OpenJDK-in-headless-mode-without-req.patch new file +144 -0

144 lines not on this page · raw message

package/openjdk/25.0.2+10/0003-src-hotspot-aarch64-macro-assembler-fix-cmp.patch new file +43 -0

43 lines not on this page · raw message

package/openjdk/25.0.2+10/0004-src-hotspot-share-gc-shenandoah-fix-constexpr.patch new file +42 -0

42 lines not on this page · raw message

package/openjdk/Config.in +5 -2
index 7f29e7a4897..022ded8dbb8 100644
@@ -53,8 +53,8 @@ if BR2_PACKAGE_OPENJDK
 choice
 	prompt "openjdk version"
 	default BR2_PACKAGE_OPENJDK_VERSION_17 if BR2_OPENJDK_VERSION_LTS # legacy
-	default BR2_PACKAGE_OPENJDK_VERSION_21 if BR2_OPENJDK_VERSION_LATEST # legacy
-	default BR2_PACKAGE_OPENJDK_VERSION_21
+	default BR2_PACKAGE_OPENJDK_VERSION_25 if BR2_OPENJDK_VERSION_LATEST # legacy
+	default BR2_PACKAGE_OPENJDK_VERSION_25
 	help
 	  Select the version of OpenJDK you wish to use.
 
@@ -64,6 +64,9 @@ config BR2_PACKAGE_OPENJDK_VERSION_17
 config BR2_PACKAGE_OPENJDK_VERSION_21
 	bool "OpenJDK 21"
 
+config BR2_PACKAGE_OPENJDK_VERSION_25
+	bool "OpenJDK 25"
+
 endchoice
 
 config BR2_PACKAGE_OPENJDK_X11
package/openjdk/openjdk.hash +1 -0
index 209004a2924..ae0aa80bf67 100644
@@ -1,4 +1,5 @@
 # Locally computed
+sha256  9b3164cedf78d7a76a59499d7a6833145c7e0269ec7b664bfe5ee03ced2f449e  openjdk-25.0.2+10.tar.gz
 sha256  b8b37fa6fcc284d91e7458c703ca4c893a1dd5a6e0f6b9e198e7d13cd8efd24d  openjdk-21.0.4+7.tar.gz
 sha256  ccb7d37c24f9f5808f9d25419d93680570dc600f292e68944032338cb4b2c51e  openjdk-17.0.12+7.tar.gz
 sha256  4b9abebc4338048a7c2dc184e9f800deb349366bdf28eb23c2677a77b4c87726  LICENSE
package/openjdk/openjdk.mk +6 -4
index 58b266c4e95..6535d106736 100644
@@ -4,11 +4,14 @@
 #
 ################################################################################
 
-ifeq ($(BR2_PACKAGE_OPENJDK_VERSION_21),y)
+ifeq ($(BR2_PACKAGE_OPENJDK_VERSION_25),y)
+OPENJDK_VERSION_MAJOR = 25
+OPENJDK_VERSION_MINOR = 0.2
+OPENJDK_VERSION_BUILD = 10
+else ifeq ($(BR2_PACKAGE_OPENJDK_VERSION_21),y)
 OPENJDK_VERSION_MAJOR = 21
 OPENJDK_VERSION_MINOR = 0.4
 OPENJDK_VERSION_BUILD = 7
-
 else
 OPENJDK_VERSION_MAJOR = 17
 OPENJDK_VERSION_MINOR = 0.12
@@ -80,7 +83,6 @@ OPENJDK_CONF_ENV = \
 
 OPENJDK_CONF_OPTS = \
 	--disable-full-docs \
-	--disable-manpages \
 	--disable-warnings-as-errors \
 	--enable-openjdk-only \
 	--enable-unlimited-crypto \
@@ -90,7 +92,7 @@ OPENJDK_CONF_OPTS = \
 	--with-debug-level=release \
 	--with-devkit=$(HOST_DIR) \
 	--with-extra-cflags="$(TARGET_CFLAGS)" \
-	--with-extra-cxxflags="$(TARGET_CXXFLAGS)" \
+	--with-extra-cxxflags="$(TARGET_CXXFLAGS) -fpermissive" \
 	--with-extra-ldflags="-Wl,-rpath,$(OPENJDK_INSTALL_BASE)/lib,-rpath,$(OPENJDK_INSTALL_BASE)/lib/$(OPENJDK_JVM_VARIANT)" \
 	--with-giflib=system \
 	--with-jobs=$(PARALLEL_JOBS) \
support/testing/tests/package/br2-external/openjdk/package/openjdk-jni-test/JniTest.java +1 -1
index 21d96797880..97dec8b8048 100644
@@ -33,7 +33,7 @@ public class JniTest
 	public static void main(String[] args)
 	{
 		var actualVersion = JniWrapper.get_jni_version();
-		var expectedVersion = 0x00150000;
+		var expectedVersion = 0x00180000;
 		JniTest.Test(
 			"Get JNI Version",
 			actualVersion,
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot