As we discussed in the last meeting, we reset the ports tree and began from scratch, even though this change involves porting all the packages. Starting small and growing gradually, this approach will reduce build times and consequently lower energy consumption in a world affected by climate change. We will add new ports as users needs arise; ok h3artbl33d@
This commit is contained in:
parent
83a0aaf92c
commit
9a3af55370
59377 changed files with 98673 additions and 4712155 deletions
|
@ -5,18 +5,17 @@ DPB_PROPERTIES= parallel
|
|||
|
||||
COMMENT= OpenJDK Software Development Kit v${V}
|
||||
BASE_VER= 1.8.0
|
||||
UPDATE_VER= 382
|
||||
BUILD_VER= b05
|
||||
UPDATE_VER= 412
|
||||
BUILD_VER= b08
|
||||
BSD_PORT_REL= 1
|
||||
V= ${BASE_VER}.${UPDATE_VER}.${BUILD_VER}.${BSD_PORT_REL}
|
||||
PKGNAME= jdk-${V}
|
||||
PKGSTEM= jdk-${BASE_VER}
|
||||
EPOCH= 0
|
||||
REVISION= 1
|
||||
|
||||
DIST_SUBDIR= jdk
|
||||
DISTNAME= jdk8u${UPDATE_VER}-${BUILD_VER}.${BSD_PORT_REL}
|
||||
BOOTJDK_DATE= 20230629
|
||||
BOOTJDK_DATE= 20240331
|
||||
WRKDIST= ${WRKDIR}/jdk8u-jdk8u${UPDATE_VER}-${BUILD_VER}.${BSD_PORT_REL}
|
||||
|
||||
CATEGORIES= devel/jdk java
|
||||
|
@ -27,8 +26,8 @@ FLAVOR?=
|
|||
HOMEPAGE= https://openjdk.java.net/
|
||||
|
||||
SITES= https://github.com/battleblow/jdk8u/archive/
|
||||
SITES.boot= https://spacehopper.org/mirrors/ \
|
||||
http://www.intricatesoftware.com/distfiles/
|
||||
SITES.boot= http://www.intricatesoftware.com/distfiles/ \
|
||||
https://spacehopper.org/mirrors/
|
||||
|
||||
MAINTAINER= Kurt Miller <kurt@openbsd.org>
|
||||
|
||||
|
@ -52,7 +51,7 @@ COMPILER= base-clang base-gcc
|
|||
.if ${FLAVOR:Mnative_bootstrap}
|
||||
INSTALLED!= (pkg_info -qe "jdk->=1.8.0.00v0,<1.9v0" && echo yes) || echo no
|
||||
. if ${INSTALLED:L} != "yes"
|
||||
ERRORS += "Fatal: This flavor requires an installed 1.8.0.00v0 or greater jdk package"
|
||||
ERRORS+= "Fatal: This flavor requires an installed 1.8v0 or greater jdk package"
|
||||
. endif
|
||||
BUILD_DEPENDS+= jdk->=1.8.0.00v0,<1.9v0:devel/jdk/1.8
|
||||
BOOT_JDK= ${LOCALBASE}/jdk-1.8.0
|
||||
|
@ -75,7 +74,8 @@ BUILD_DEPENDS+= archivers/zip \
|
|||
LIB_DEPENDS= converters/libiconv \
|
||||
graphics/giflib
|
||||
|
||||
WANTLIB= X11 Xext Xi Xrender Xtst c freetype gif iconv m pthread ${COMPILER_LIBCXX} z
|
||||
WANTLIB= X11 Xext Xi Xrender Xtst c freetype gif iconv m pthread \
|
||||
${COMPILER_LIBCXX} z
|
||||
|
||||
USE_GMAKE= Yes
|
||||
GMAKE= ${LOCALBASE}/bin/gmake
|
||||
|
@ -126,7 +126,9 @@ LIBARCH= ${MACHINE_ARCH:S/sparc64/sparcv9/}
|
|||
BUILDDIR= ${WRKDIST}/build/bsd-${JVMARCH}-normal-server-release/images
|
||||
JDKIMAGEDIR= ${BUILDDIR}/j2sdk-image
|
||||
WRKTMP= ${WRKDIR}/tmp
|
||||
|
||||
BOOTLIB= ${WRKTMP}/bootjdk/jre/lib
|
||||
ALL_TARGET= images
|
||||
|
||||
SUBST_VARS= JDKHOME LIBARCH
|
||||
|
||||
post-extract:
|
||||
|
@ -137,7 +139,7 @@ post-build:
|
|||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/${JDKHOME}
|
||||
cd ${JDKIMAGEDIR} && tar -cf - * | tar -C ${PREFIX}/${JDKHOME} -xf -
|
||||
cd ${JDKIMAGEDIR} && tar -cf - * | tar -C ${PREFIX}/${JDKHOME} -xf -
|
||||
|
||||
# The bootjdk is the jdk image with some parts deleted
|
||||
# and a copy of the system shared libs needed to run it.
|
||||
|
@ -150,7 +152,7 @@ build-bootjdk: build
|
|||
@${_PBUILD} mkdir -p ${WRKTMP}/bootjdk-libs
|
||||
@cd ${JDKIMAGEDIR} && \
|
||||
tar -cf - * | \
|
||||
${_PBUILD} tar -C ${WRKTMP}/bootjdk -xf -
|
||||
${_PBUILD} tar -C ${WRKTMP}/bootjdk -xf -
|
||||
@cd ${WRKTMP}/bootjdk && \
|
||||
${_PBUILD} rm -rf demo sample
|
||||
@cd ${WRKTMP}/bootjdk && \
|
||||
|
@ -161,7 +163,7 @@ build-bootjdk: build
|
|||
@find ${WRKTMP}/bootjdk/jre/lib ${WRKTMP}/bootjdk/jre/bin \
|
||||
-exec sh -c 'file {} | grep -q ELF && \
|
||||
${_PBUILD} strip -S {}' \;
|
||||
@LD_LIBRARY_PATH="${WRKTMP}/bootjdk/jre/lib/${LIBARCH}:${WRKTMP}/bootjdk/jre/lib/${LIBARCH}/server" \
|
||||
@LD_LIBRARY_PATH="${BOOTLIB}/${LIBARCH}:${BOOTLIB}/${LIBARCH}/server" \
|
||||
find ${WRKTMP}/bootjdk -type f -exec ldd {} + 2>/dev/null | \
|
||||
grep rlib | cut -d"/" -f 2-20 | sort -u | grep -v "\.so$$" | \
|
||||
xargs -I % ${_PBUILD} cp /% ${WRKTMP}/bootjdk-libs
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
SHA256 (jdk/jdk8u382-b05.1.tar.gz) = pOBSD6cHkqbI6iRSwm30QGdIJmTd4qmB6exQlGLb6nU=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-aarch64-20230629.tar.gz) = jwblbahhiItfiJaLSayi9hLJAWz02sWk/GjajZeDNfE=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-amd64-20230629.tar.gz) = otjbIFIxZX/ObPueF/TRnS3Kxsvr0oVSx9HI+gL34B0=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-i386-20230629.tar.gz) = C0lRAIZWbyD0+6wYswcFyel+6DBpeF7pMGhqsLwY50k=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-sparc64-20230629.tar.gz) = RO3wtgB8NrWhCJQbRCIYP+0PtDrETlT4PcfdQLy4PTc=
|
||||
SIZE (jdk/jdk8u382-b05.1.tar.gz) = 93689861
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-aarch64-20230629.tar.gz) = 107390945
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-amd64-20230629.tar.gz) = 108012513
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-i386-20230629.tar.gz) = 103675294
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-sparc64-20230629.tar.gz) = 107573452
|
||||
SHA256 (jdk/jdk8u412-b08.1.tar.gz) = sT9YKjVLi3orPZj7ptMBrn3sT/VzuKnn7klgV25Hg4k=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-aarch64-20240331.tar.gz) = c97g4lcUdCuhf0p+Bkl/RTrsrcubF833EBiW0Qvf6iY=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-amd64-20240331.tar.gz) = HaL2y3Fbd1oQjo7FK1/5gQUQGkCrBEU8xujly7E7/Xg=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-i386-20240331.tar.gz) = xyxPOeWLY6THt/lJTDNxU9SJmuYD4yoKwOnj7QTx8l8=
|
||||
SHA256 (jdk/openjdk-jdk8u-bootjdk-sparc64-20240331.tar.gz) = fFaG5FMLq6GgZftwe3FqWEFBNrsp6cy1mwiVLo7vmWE=
|
||||
SIZE (jdk/jdk8u412-b08.1.tar.gz) = 93596695
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-aarch64-20240331.tar.gz) = 108519604
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-amd64-20240331.tar.gz) = 108411393
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-i386-20240331.tar.gz) = 104141193
|
||||
SIZE (jdk/openjdk-jdk8u-bootjdk-sparc64-20240331.tar.gz) = 107630630
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
Index: common/autoconf/generated-configure.sh
|
||||
--- common/autoconf/generated-configure.sh.orig
|
||||
+++ common/autoconf/generated-configure.sh
|
||||
@@ -41217,7 +41217,7 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld requires -z wxneeded" >&5
|
||||
$as_echo_n "checking if ld requires -z wxneeded... " >&6; }
|
||||
PUSHED_LDFLAGS="$LDFLAGS"
|
||||
- LDFLAGS="$LDFLAGS -Wl,-z,wxneeded"
|
||||
+ LDFLAGS="$LDFLAGS -Wl,-z,wxneeded -Wl,-z,nobtcfi"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
int main() { }
|
||||
@@ -41227,7 +41227,7 @@ if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
if $READELF -l conftest$ac_exeext | $GREP OPENBSD_WXNEED > /dev/null; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
- LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,wxneeded"
|
||||
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,wxneeded -Wl,-z,nobtcfi"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
|
@ -1,18 +0,0 @@
|
|||
Index: common/autoconf/toolchain.m4
|
||||
--- common/autoconf/toolchain.m4.orig
|
||||
+++ common/autoconf/toolchain.m4
|
||||
@@ -855,12 +855,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
if test "`uname -s`" = "OpenBSD"; then
|
||||
AC_MSG_CHECKING([if ld requires -z wxneeded])
|
||||
PUSHED_LDFLAGS="$LDFLAGS"
|
||||
- LDFLAGS="$LDFLAGS -Wl,-z,wxneeded"
|
||||
+ LDFLAGS="$LDFLAGS -Wl,-z,wxneeded -Wl,-z,nobtcfi"
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { }]])],
|
||||
[
|
||||
if $READELF -l conftest$ac_exeext | $GREP OPENBSD_WXNEED > /dev/null; then
|
||||
AC_MSG_RESULT([yes])
|
||||
- LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,wxneeded"
|
||||
+ LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,wxneeded -Wl,-z,nobtcfi"
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
|
@ -1,13 +0,0 @@
|
|||
Reading from .text was not the intent here.
|
||||
|
||||
Index: hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
|
||||
--- hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp.orig
|
||||
+++ hotspot/src/cpu/aarch64/vm/templateInterpreter_aarch64.cpp
|
||||
@@ -1054,7 +1054,6 @@ address InterpreterGenerator::generate_native_entry(bo
|
||||
__ ldr(r10, Address(rmethod, Method::native_function_offset()));
|
||||
address unsatisfied = (SharedRuntime::native_method_throw_unsatisfied_link_error_entry());
|
||||
__ mov(rscratch2, unsatisfied);
|
||||
- __ ldr(rscratch2, rscratch2);
|
||||
__ cmp(r10, rscratch2);
|
||||
__ br(Assembler::NE, L);
|
||||
__ call_VM(noreg,
|
|
@ -1,29 +1,17 @@
|
|||
Remove syscall(2) use.
|
||||
|
||||
Add support for detecting the primordial thread.
|
||||
Use the correct number of cpus when hw.smt=0
|
||||
|
||||
Index: hotspot/src/os/bsd/vm/os_bsd.cpp
|
||||
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig
|
||||
+++ hotspot/src/os/bsd/vm/os_bsd.cpp
|
||||
@@ -1285,7 +1285,7 @@ pid_t os::Bsd::gettid() {
|
||||
return (pid_t)tid;
|
||||
#endif
|
||||
#elif defined(__OpenBSD__)
|
||||
- retval = syscall(SYS_getthrid);
|
||||
+ return ::getthrid();
|
||||
#elif defined(__NetBSD__)
|
||||
retval = (pid_t) _lwp_self();
|
||||
#endif
|
||||
@@ -4590,6 +4590,12 @@ void os::pause() {
|
||||
"Could not open pause file '%s', continuing immediately.\n", filename);
|
||||
}
|
||||
}
|
||||
+
|
||||
+#ifdef __OpenBSD__
|
||||
+bool os::is_primordial_thread() {
|
||||
+ return (pthread_main_np() == 1);
|
||||
+}
|
||||
@@ -299,7 +299,11 @@ void os::Bsd::initialize_system_info() {
|
||||
|
||||
/* get processors count via hw.ncpus sysctl */
|
||||
mib[0] = CTL_HW;
|
||||
+#if defined(HW_NCPUONLINE)
|
||||
+ mib[1] = HW_NCPUONLINE;
|
||||
+#else
|
||||
mib[1] = HW_NCPU;
|
||||
+#endif
|
||||
|
||||
|
||||
// Refer to the comments in os_solaris.cpp park-unpark.
|
||||
len = sizeof(cpu_val);
|
||||
if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1 && cpu_val >= 1) {
|
||||
assert(len == sizeof(cpu_val), "unexpected data size");
|
||||
|
|
|
@ -1,24 +1,21 @@
|
|||
Sync changes with os_linux_sparc.cpp
|
||||
Support setting thread stack sizes on sparc64
|
||||
Fix implicit FPE exceptions on sparc64
|
||||
|
||||
Index: hotspot/src/os_cpu/bsd_sparc/vm/os_bsd_sparc.cpp
|
||||
--- hotspot/src/os_cpu/bsd_sparc/vm/os_bsd_sparc.cpp.orig
|
||||
+++ hotspot/src/os_cpu/bsd_sparc/vm/os_bsd_sparc.cpp
|
||||
@@ -618,7 +618,7 @@ JVM_handle_bsd_signal(int sig,
|
||||
return 1;
|
||||
}
|
||||
@@ -608,6 +608,15 @@ JVM_handle_bsd_signal(int sig,
|
||||
pc = address(SIG_PC(uc));
|
||||
npc = address(SIG_NPC(uc));
|
||||
|
||||
- if (checkPrefetch(uc, pc)) {
|
||||
+ if ((sig == SIGSEGV || sig == SIGBUS) && checkPrefetch(uc, pc)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@ bool os::is_allocatable(size_t bytes) {
|
||||
|
||||
size_t os::Bsd::min_stack_allowed = 128 * K;
|
||||
|
||||
-bool os::Bsd::supports_variable_stack_size() { return false; }
|
||||
+bool os::Bsd::supports_variable_stack_size() { return true; }
|
||||
|
||||
// return default stack size for thr_type
|
||||
size_t os::Bsd::default_stack_size(os::ThreadType thr_type) {
|
||||
+#ifdef __OpenBSD__
|
||||
+ // the kernel advances ucontext_t pc and npc one instruction for FPE signals
|
||||
+ // See /sys/arch/sparc64/sparc64/trap.c
|
||||
+ if (sig == SIGFPE) {
|
||||
+ pc -= 4;
|
||||
+ npc -= 4;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Check to see if we caught the safepoint code in the
|
||||
// process of write protecting the memory serialization page.
|
||||
// It write enables the page immediately after protecting it
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
Add support for detecting the primordial thread
|
||||
|
||||
Index: hotspot/src/share/vm/runtime/os.hpp
|
||||
--- hotspot/src/share/vm/runtime/os.hpp.orig
|
||||
+++ hotspot/src/share/vm/runtime/os.hpp
|
||||
@@ -468,7 +468,7 @@ class os: AllStatic {
|
||||
// need special-case handling of the primordial thread if it attaches
|
||||
// to the VM.
|
||||
static bool is_primordial_thread(void)
|
||||
-#if defined(_WINDOWS) || defined(BSD)
|
||||
+#if defined(_WINDOWS) || (defined(BSD) && !defined(__OpenBSD__))
|
||||
// No way to identify the primordial thread.
|
||||
{ return false; }
|
||||
#else
|
|
@ -1,19 +0,0 @@
|
|||
Disable stack guarding on the primordial thread because its protections
|
||||
are immutable. Note this will interfere with the primordial thread throwing
|
||||
StackOverflowError exceptions.
|
||||
|
||||
Index: hotspot/src/share/vm/runtime/thread.cpp
|
||||
--- hotspot/src/share/vm/runtime/thread.cpp.orig
|
||||
+++ hotspot/src/share/vm/runtime/thread.cpp
|
||||
@@ -2494,7 +2494,11 @@ void JavaThread::java_resume() {
|
||||
void JavaThread::create_stack_guard_pages() {
|
||||
if (!os::uses_stack_guard_pages() ||
|
||||
_stack_guard_state != stack_guard_unused ||
|
||||
+#ifdef __OpenBSD__
|
||||
+ os::is_primordial_thread()) {
|
||||
+#else
|
||||
(DisablePrimordialThreadGuardPages && os::is_primordial_thread())) {
|
||||
+#endif
|
||||
if (TraceThreadEvents) {
|
||||
tty->print_cr("Stack guard page creation for thread "
|
||||
UINTX_FORMAT " disabled", os::current_thread_id());
|
Loading…
Add table
Add a link
Reference in a new issue