Skip to content

Commit

Permalink
Set correct runtime linker for JRE 21 (dunfell)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Veit <[email protected]>
  • Loading branch information
sebveit committed Feb 15, 2024
1 parent 1e663a6 commit b144bc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes-core/openjdk-21-jre/openjdk-21-jre_21.0.1+12.bb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-with-classpath-exceptio
COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
OVERRIDES = "${TARGET_ARCH}"

DEPENDS = "patchelf-native"

JVM_SUBDIR:aarch64 = "jdk-21.0.1+12-jre"
JVM_CHECKSUM:aarch64 = "4582c4cc0c6d498ba7a23fdb0a5179c9d9c0d7a26f2ee8610468d5c2954fcf2f"
JVM_RDEPENDS:aarch64 = " \
Expand Down Expand Up @@ -70,6 +72,13 @@ do_compile[noexec] = "1"
do_install() {
install -d ${D}${libdir_jre}
cp -R --no-dereference --preserve=mode,links -v ${S}/* ${D}${libdir_jre}

LDLINUX=$(basename $(ls -1 ${RECIPE_SYSROOT}${base_libdir}/ld-linux-* | sort | head -n1))
if [ -n "$LDLINUX" ]; then
for i in ${D}${libdir}/jvm/${BPN}/bin/* ; do
patchelf --set-interpreter ${base_libdir}/$LDLINUX $i
done
fi
}

RPROVIDES:${PN} = "java2-runtime"
Expand Down

0 comments on commit b144bc6

Please sign in to comment.