Files
buildroot/package/openjdk/Config.in
Thomas Devoogdt 6106c2c21c 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

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
[Bernd:
 - rebased on bump of versions 17 & 21
 - build-tested with gcc 16-snapshot]
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
[Julien:
 - add .checkpackageignore entry to fix check-package error
 - reformat patches with without numbering to fix check-package error
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-05-30 15:48:42 +02:00

182 lines
5.7 KiB
Plaintext

config BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS
bool
default y if BR2_HOSTARCH = "x86_64"
default y if BR2_HOSTARCH = "aarch64"
# Taken from make/autoconf/platform.m4
config BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS
bool
default y if BR2_aarch64
default y if BR2_arc && !(BR2_arc750d || BR2_arc770d)
default y if BR2_arm
default y if BR2_i386 || BR2_x86_64
default y if BR2_m68k
default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
default y if BR2_sh
config BR2_PACKAGE_OPENJDK
bool "openjdk"
depends on BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS
depends on BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS
depends on !BR2_SOFT_FLOAT
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, C++14 for OpenJDK17
# Strictly needed only for OpenJDK17, but to keep dependencies
# simple with ARC supported only with OpenJDK17, we make this
# dependency apply to OpenJDK as a whole.
depends on BR2_HOST_GCC_AT_LEAST_4_9 # C++14
depends on BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_USE_MMU # cups
select BR2_PACKAGE_ALSA_LIB
select BR2_PACKAGE_ALSA_LIB_MIXER
select BR2_PACKAGE_ALSA_LIB_PCM
select BR2_PACKAGE_ALSA_LIB_RAWMIDI
select BR2_PACKAGE_ALSA_LIB_SEQ
select BR2_PACKAGE_CUPS
select BR2_PACKAGE_FONTCONFIG
select BR2_PACKAGE_GIFLIB
select BR2_PACKAGE_JPEG
select BR2_PACKAGE_LCMS2
select BR2_PACKAGE_LIBPNG
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_ZLIB
help
OpenJDK is a free and open-source implementation of the
Java Platform.
http://openjdk.java.net/
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_25 if BR2_OPENJDK_VERSION_LATEST # legacy
default BR2_PACKAGE_OPENJDK_VERSION_25
help
Select the version of OpenJDK you wish to use.
config BR2_PACKAGE_OPENJDK_VERSION_17
bool "OpenJDK 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
bool "Build with AWT head support"
depends on BR2_PACKAGE_XORG7
select BR2_PACKAGE_XLIB_LIBXRANDR
select BR2_PACKAGE_XLIB_LIBXRENDER
select BR2_PACKAGE_XLIB_LIBXT
select BR2_PACKAGE_XLIB_LIBXTST
comment "openjdk AWT head support needs X.org"
depends on !BR2_PACKAGE_XORG7
config BR2_PACKAGE_OPENJDK_FULL_JDK
bool "Build the full JDK"
help
Install the full JDK instead of just the run time.
The full JDK includes several packages used for debugging and
development. Some useful tools included with the JDK are:
- javaws
Command line tool for launching Java Web Start and setting
various options.
- jcmd:
JVM Diagnostic Commands tool: Sends diagnostic command
requests to a running Java Virtual Machine.
- jinfo
Configuration Info for Java: Prints configuration
information for a given process or core file or a remote
debug server.
- jmap
Memory Map for Java: Prints shared object memory maps or
heap memory details of a given process or core file or a
remote debug server.
- jsadebugd
Serviceability Agent Debug Daemon for Java: Attaches to a
process or core file and acts as a debug server.
- jstack
Stack Trace for Java - Prints a stack trace of threads for
a given process or core file or remote debug server.
- jstat
JVM Statistics Monitoring Tool: Attaches to an
instrumented HotSpot Java virtual machine and collects and
logs performance statistics as specified by the command
line options.
- jstatd
JVM jstat Daemon - Launches an RMI server application that
monitors for the creation and termination of instrumented
HotSpot Java virtual machines and provides an interface to
allow remote monitoring tools to attach to Java virtual
machines running on the local system.
Note:
While the JDK also comes with several tools which can be used
for developing java applications on a target, Buildroot does
not support development on a target. Building the full JDK is
supported for debugging purposes only.
Selecting this option increases the file system by
approximately 110M.
choice
prompt "openjdk variant"
default BR2_PACKAGE_OPENJDK_JVM_VARIANT_SERVER if !(BR2_powerpc || BR2_arc)
default BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO if BR2_powerpc
default BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO if BR2_arc
config BR2_PACKAGE_OPENJDK_JVM_VARIANT_CLIENT
bool "client"
depends on !(BR2_powerpc || BR2_arc)
help
Quick loading, but slower run-time performance.
config BR2_PACKAGE_OPENJDK_JVM_VARIANT_SERVER
bool "server"
depends on !(BR2_powerpc || BR2_arc)
help
Slower loading, but faster run-time performance.
config BR2_PACKAGE_OPENJDK_JVM_VARIANT_ZERO
bool "zero"
select BR2_PACKAGE_LIBFFI
help
A non-assembler variant with wide arch support, however
performance is less than client/server.
http://openjdk.java.net/projects/zero
endchoice
endif
comment "openjdk needs glibc, and a toolchain w/ wchar, dynamic library, threads, C++, gcc >= 4.9, host gcc >= 4.9"
depends on BR2_USE_MMU
depends on BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS
depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_USES_GLIBC || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
!BR2_HOST_GCC_AT_LEAST_4_9
comment "openjdk does not support soft float configurations"
depends on BR2_PACKAGE_OPENJDK_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_OPENJDK_BIN_ARCH_SUPPORTS
depends on BR2_USE_MMU
depends on BR2_SOFT_FLOAT