openjdk13-bootstrap: move to github distfiles, fix check

hg.openjdk.java.net is gone

fully disabling parallel build seems to fix the segfaults and
IOExceptions during build
This commit is contained in:
classabbyamp 2024-05-29 21:33:22 -04:00
parent d0fc2a1e27
commit 81bf422adc
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
2 changed files with 39 additions and 26 deletions

View File

@ -0,0 +1,33 @@
From f77a1a156f3da9068d012d9227c7ee0fee58f571 Mon Sep 17 00:00:00 2001
From: David Holmes <dholmes@openjdk.org>
Date: Sun, 22 Aug 2021 01:13:27 +0000
Subject: [PATCH] 8272472: StackGuardPages test doesn't build with glibc 2.34
Reviewed-by: shade, stuefe, jiefu
---
.../jtreg/runtime/StackGuardPages/exeinvoke.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c
index a46f1cef44c78..50a37001fbf33 100644
--- a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c
+++ b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c
@@ -68,8 +68,17 @@ static void handler(int sig, siginfo_t *si, void *unused) {
longjmp(context, 1);
}
+static char* altstack = NULL;
+
void set_signal_handler() {
- static char altstack[SIGSTKSZ];
+ if (altstack == NULL) {
+ // Dynamically allocated in case SIGSTKSZ is not constant
+ altstack = malloc(SIGSTKSZ);
+ if (altstack == NULL) {
+ fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n");
+ exit(7);
+ }
+ }
stack_t ss = {
.ss_size = SIGSTKSZ,

View File

@ -1,7 +1,7 @@
# Template file for 'openjdk13-bootstrap'
pkgname=openjdk13-bootstrap
version=13.0.2+8
revision=1
revision=2
_java_ver="${version%%.*}"
_jdk_update="${version#*+}"
_base_version="${version%+*}"
@ -18,7 +18,7 @@ configure_args="--disable-warnings-as-errors
--with-lcms=system
--with-jtreg=no
--with-debug-level=release
--with-jobs=${XBPS_ORIG_MAKEJOBS}
--with-jobs=1
--with-version-pre=
--with-version-build=${_jdk_update}
--with-version-opt=void-r${revision}
@ -38,15 +38,16 @@ short_desc="OpenJDK Java Development Kit (bootstrap version 13)"
maintainer="classabbyamp <void@placeviolette.net>"
license="GPL-2.0-only WITH Classpath-exception-2.0"
homepage="https://openjdk.java.net/"
distfiles="https://hg.openjdk.java.net/jdk-updates/jdk${_java_ver}u/archive/jdk-${version}.tar.gz"
checksum=a2f44d036b0922207387bd598b66fb6858852c188b6211df675dbea3f3ea79c8
distfiles="https://github.com/openjdk/jdk${_java_ver}u/archive/refs/tags/jdk-${version}.tar.gz"
checksum=c0813fdebd5cbed46d9ab8d59788a9c7511d17884d32d343a49c209221abd452
provides="java-environment-${version}_1 java-runtime-${version}_1"
lib32disabled=yes
nocross=yes
repository=bootstrap
# Build is still parallel, but don't use -jN.
# FTBFS when parallel, DO NOT set --with-jobs >1 in configure_args
disable_parallel_build=yes
disable_parallel_check=yes
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
@ -113,27 +114,6 @@ do_configure() {
OBJDUMP=$OBJDUMP OBJCOPY=$OBJCOPY
}
do_build() {
# do_build is overridden because of intermittent segfaults and IOExceptions during the build
# through many attempts, it was found that 3 tries is a good amount to make it work
for _try in 1 2 3; do
msg_normal "Attempt $_try ...\n"
# adapted from build style
: ${make_cmd:=make}
export lt_cv_sys_lib_dlsearch_path_spec="/usr/lib64 /usr/lib32 /usr/lib /lib /usr/local/lib"
${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} && break
# end adapted from build style
if [ $_try -lt 3 ]; then
msg_warn "Build failed, retrying ...\n"
else
msg_warn "Build failed, out of attempts\n"
fi
done
}
post_install() {
mv ${DESTDIR}/usr/lib/jvm/openjdk-${_base_version} ${DESTDIR}/$_jdk_home
rm -rf ${DESTDIR}/usr/lib/bin