New package: openjdk20-bootstrap-20.0.2+9
This commit is contained in:
parent
bd4095a9c3
commit
5ebc4af805
36
srcpkgs/openjdk20-bootstrap/patches/FixNullPtrCast.patch
Normal file
36
srcpkgs/openjdk20-bootstrap/patches/FixNullPtrCast.patch
Normal file
@ -0,0 +1,36 @@
|
||||
Patch taken from Alpine: https://git.alpinelinux.org/aports/tree/community/openjdk17/FixNullPtrCast.patch
|
||||
|
||||
same fix for armv7l-musl added
|
||||
|
||||
Subject: Fix cast errors with latest GCC
|
||||
Upstream: No
|
||||
Author: Simon Frankenberger <simon-alpine@fraho.eu>
|
||||
|
||||
This patch fixes one remaining casting error reported by GCC 12 for aarch64
|
||||
|
||||
--- old/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
|
||||
+++ new/src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
virtual void pass_object() {
|
||||
intptr_t* addr = single_slot_addr();
|
||||
- intptr_t value = *addr == 0 ? NULL : (intptr_t)addr;
|
||||
+ intptr_t value = *addr == 0 ? (intptr_t) 0 : (intptr_t)addr;
|
||||
if (pass_gpr(value) < 0) {
|
||||
pass_stack<>(value);
|
||||
}
|
||||
|
||||
--- old/src/hotspot/cpu/arm/interpreterRT_arm.cpp
|
||||
+++ new/src/hotspot/cpu/arm/interpreterRT_arm.cpp
|
||||
@@ -306,8 +306,8 @@
|
||||
virtual void pass_object() {
|
||||
intptr_t from_addr = (intptr_t)(_from + Interpreter::local_offset_in_bytes(0));
|
||||
if(_last_gp < GPR_PARAMS) {
|
||||
- _toGP[_last_gp++] = (*(intptr_t*)from_addr == 0) ? NULL : from_addr;
|
||||
+ _toGP[_last_gp++] = (*(intptr_t*)from_addr == 0) ? (intptr_t) 0 : (intptr_t)from_addr;
|
||||
} else {
|
||||
- *_to++ = (*(intptr_t*)from_addr == 0) ? NULL : from_addr;
|
||||
+ *_to++ = (*(intptr_t*)from_addr == 0) ? (intptr_t) 0 : (intptr_t)from_addr;
|
||||
}
|
||||
_from -= Interpreter::stackElementSize;
|
||||
}
|
101
srcpkgs/openjdk20-bootstrap/template
Normal file
101
srcpkgs/openjdk20-bootstrap/template
Normal file
@ -0,0 +1,101 @@
|
||||
# Template file for 'openjdk20-bootstrap'
|
||||
pkgname=openjdk20-bootstrap
|
||||
version=20.0.2+9
|
||||
revision=1
|
||||
_gtest_ver=1.8.1
|
||||
_java_ver="${version%%.*}"
|
||||
_jdk_update="${version#*+}"
|
||||
_base_version="${version%+*}"
|
||||
_jdk_home="usr/lib/jvm/openjdk${_java_ver}"
|
||||
archs="x86_64* aarch64*"
|
||||
create_wrksrc=yes
|
||||
build_wrksrc="jdk${_java_ver}u-jdk-${version/+/-}"
|
||||
build_style=gnu-configure
|
||||
configure_args="--disable-warnings-as-errors
|
||||
--enable-unlimited-crypto
|
||||
--with-zlib=system
|
||||
--with-libjpeg=system
|
||||
--with-giflib=system
|
||||
--with-libpng=system
|
||||
--with-lcms=system
|
||||
--with-jtreg=no
|
||||
--with-gtest=../googletest-release-${_gtest_ver}
|
||||
--with-debug-level=release
|
||||
--with-native-debug-symbols=internal
|
||||
--with-jobs=${XBPS_ORIG_MAKEJOBS}
|
||||
--with-version-pre=
|
||||
--with-version-build=${_jdk_update}
|
||||
--with-version-opt=void-r${revision}
|
||||
--with-vendor-name=Void
|
||||
--with-vendor-url=https://voidlinux.org/
|
||||
--with-vendor-bug-url=https://github.com/void-linux/void-packages/issues
|
||||
--with-vendor-vm-bug-url=https://github.com/void-linux/void-packages/issues
|
||||
--with-boot-jdk=/usr/lib/jvm/openjdk$(( _java_ver - 1 ))"
|
||||
make_build_args="images"
|
||||
make_check_target="test-hotspot-gtest"
|
||||
hostmakedepends="pkg-config automake autoconf cpio tar unzip zip ca-certificates
|
||||
openssl zlib-devel which make-ca openjdk$(( _java_ver - 1 ))-bootstrap"
|
||||
makedepends="libXrender-devel libXtst-devel libXt-devel libXrandr-devel
|
||||
giflib-devel libjpeg-turbo-devel cups-devel freetype-devel alsa-lib-devel
|
||||
fontconfig-devel zlib-devel lcms2-devel"
|
||||
short_desc="OpenJDK Java Development Kit (bootstrap version ${_java_ver})"
|
||||
maintainer="classabbyamp <void@placeviolette.net>"
|
||||
license="GPL-2.0-only WITH Classpath-exception-2.0"
|
||||
homepage="http://openjdk.java.net/"
|
||||
distfiles="https://github.com/openjdk/jdk${_java_ver}u/archive/jdk-${version}.tar.gz
|
||||
https://github.com/google/googletest/archive/refs/tags/release-${_gtest_ver}.tar.gz"
|
||||
checksum="4d6f176075d5f2ce62fd16ebd5cc4c27a3e551ce4d3d3bc0e9946454e52fc88d
|
||||
9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c"
|
||||
nocross=yes
|
||||
repository=bootstrap
|
||||
patch_args="-Np1 --directory=$build_wrksrc"
|
||||
|
||||
# Build and check are still parallel, but don't use -jN.
|
||||
disable_parallel_build=yes
|
||||
disable_parallel_check=yes
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*|arm*) broken="Unsupported architecture" ;;
|
||||
esac
|
||||
|
||||
post_extract() {
|
||||
chmod +x "$build_wrksrc"/configure
|
||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||
rm -r "$build_wrksrc"/src/jdk.hotspot.agent
|
||||
fi
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
|
||||
CXXFLAGS=${CXXFLAGS/-D_FORTIFY_SOURCE=2/}
|
||||
|
||||
# force ELFv2 for ppc64 just in case
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*)
|
||||
CFLAGS+=" -DABI_ELFv2"
|
||||
CXXFLAGS+=" -DABI_ELFv2"
|
||||
;;
|
||||
esac
|
||||
|
||||
configure_args=${configure_args/--with-libtool-sysroot=$XBPS_CROSS_BASE}
|
||||
if [ "$XBPS_CCACHE" ] && [ -z "$CROSS_BUILD" ]; then
|
||||
configure_args+=" --enable-ccache"
|
||||
CC="/usr/bin/cc"
|
||||
CXX="/usr/bin/c++"
|
||||
fi
|
||||
./configure ${configure_args} \
|
||||
--with-extra-cflags="$CFLAGS" \
|
||||
--with-extra-cxxflags="$CXXFLAGS" \
|
||||
--with-extra-ldflags="$LDFLAGS" \
|
||||
READELF="$READELF" AR="$AR" STRIP="$STRIP" NM="$NM" \
|
||||
OBJDUMP="$OBJDUMP" OBJCOPY="$OBJCOPY"
|
||||
}
|
||||
|
||||
pre_install() {
|
||||
make_install_args="INSTALL_PREFIX=${DESTDIR}/usr/lib"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
rm -rf "${DESTDIR}"/usr/lib/bin
|
||||
mv "${DESTDIR}"/usr/lib/jvm/openjdk-"${_base_version}" "${DESTDIR}/$_jdk_home"
|
||||
}
|
4
srcpkgs/openjdk20-bootstrap/update
Normal file
4
srcpkgs/openjdk20-bootstrap/update
Normal file
@ -0,0 +1,4 @@
|
||||
site="https://github.com/openjdk/jdk20u/tags"
|
||||
pattern='jdk-\K20\.[\d.+]+(?=\.)'
|
||||
# don't need to update the bootstrap package
|
||||
ignore="*"
|
Loading…
Reference in New Issue
Block a user