diff options
Diffstat (limited to 'java/openjdk23')
4 files changed, 12 insertions, 141 deletions
diff --git a/java/openjdk23/Makefile b/java/openjdk23/Makefile index 009beccc3d76..fc20c675bde0 100644 --- a/java/openjdk23/Makefile +++ b/java/openjdk23/Makefile @@ -3,7 +3,6 @@ DISTVERSIONPREFIX= jdk- DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} CATEGORIES= java devel PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} -PORTREVISION= 2 MAINTAINER= java@FreeBSD.org COMMENT= Java Development Kit ${JDK_MAJOR_VERSION} @@ -40,15 +39,19 @@ USE_XORG= x11 xext xi xrandr xrender xt xtst CPE_VENDOR= oracle USE_GITHUB= yes -GH_ACCOUNT= battleblow -GH_PROJECT= jdk23u +GH_ACCOUNT= freebsd +GH_PROJECT= openjdk +GH_TAGNAME= jdk-23.0.2+7-freebsd-2 NO_CCACHE= yes -MAKE_JOBS_UNSAFE= yes +# Suppress passing -j to do-build target via Mk/bsd.port.mk +# In the JDK build the number of parallel jobs is passed in via configure --with-num-cores=N +_MAKE_JOBS= # MAKE_ENV= CLASSPATH="" \ JAVA_HOME="" \ LD_LIBRARY_PATH="" \ + LOG=cmdlines \ MAKEFLAGS="" JDK_OSARCH= bsd-${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc64/ppc64/} @@ -66,7 +69,7 @@ JDK_MAJOR_VERSION= 23 JDK_MINOR_VERSION= 0 JDK_PATCH_VERSION= 2 JDK_BUILD_NUMBER= 7 -BSD_JDK_VERSION= 1 +BSD_JDK_VERSION= 2 JDK_BUG_URL= https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Ports%20%26%20Packages&component=Individual%20Port(s)&short_desc=java/${PORTNAME}${JDK_MAJOR_VERSION}%3A%20 @@ -85,6 +88,7 @@ CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --with-giflib-lib=${LOCALBASE}/lib \ --with-harfbuzz=system \ --with-libpng=system \ + --with-num-cores=${MAKE_JOBS_NUMBER} \ --with-zlib=system \ --with-lcms=system \ --x-includes=${LOCALBASE}/include \ diff --git a/java/openjdk23/distinfo b/java/openjdk23/distinfo index c4503618142a..110eeb899a39 100644 --- a/java/openjdk23/distinfo +++ b/java/openjdk23/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1739592718 -SHA256 (battleblow-jdk23u-jdk-23.0.2+7-1_GH0.tar.gz) = 092147404af068e85dbd1535f36da32c9a2077708154f69ba3a94ba64fa2aaba -SIZE (battleblow-jdk23u-jdk-23.0.2+7-1_GH0.tar.gz) = 117326728 +TIMESTAMP = 1756989931 +SHA256 (freebsd-openjdk-jdk-23.0.2+7-2-jdk-23.0.2+7-freebsd-2_GH0.tar.gz) = ec011f440f6e3f0eff1b67811a3a9fc5094be772f30519af2bfb914abaa6d666 +SIZE (freebsd-openjdk-jdk-23.0.2+7-2-jdk-23.0.2+7-freebsd-2_GH0.tar.gz) = 117311366 diff --git a/java/openjdk23/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp b/java/openjdk23/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp deleted file mode 100644 index dda6fd26cce0..000000000000 --- a/java/openjdk23/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp +++ /dev/null @@ -1,44 +0,0 @@ ---- src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp.orig 2024-04-11 22:23:08 UTC -+++ src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp -@@ -61,6 +61,7 @@ - # include <sys/types.h> - # include <sys/mman.h> - # include <pthread.h> -+# include <pthread_np.h> - # include <signal.h> - # include <errno.h> - # include <dlfcn.h> -@@ -432,6 +433,33 @@ size_t os::Posix::default_stack_size(os::ThreadType th - // Default stack size (compiler thread needs larger stack). - size_t s = (thr_type == os::compiler_thread ? 4 * M : 1024 * K); - return s; -+} -+ -+void os::current_stack_base_and_size(address* base, size_t* size) { -+ address bottom; -+ pthread_attr_t attr; -+ -+ int rslt = pthread_attr_init(&attr); -+ -+ // JVM needs to know exact stack location, abort if it fails -+ if (rslt != 0) -+ fatal("pthread_attr_init failed with error = %d", rslt); -+ -+ rslt = pthread_attr_get_np(pthread_self(), &attr); -+ -+ if (rslt != 0) -+ fatal("pthread_attr_get_np failed with error = %d", rslt); -+ -+ if (pthread_attr_getstackaddr(&attr, (void **)&bottom) != 0 || -+ pthread_attr_getstacksize(&attr, size) != 0) { -+ fatal("Can not locate current stack attributes!"); -+ } -+ -+ *base = bottom + *size; -+ -+ pthread_attr_destroy(&attr); -+ assert(os::current_stack_pointer() >= bottom && -+ os::current_stack_pointer() < *base, "just checking"); - } - - ///////////////////////////////////////////////////////////////////////////// diff --git a/java/openjdk23/files/patch-src_jdk.management_unix_native_libmanagement__ext_OperatingSystemImpl.c b/java/openjdk23/files/patch-src_jdk.management_unix_native_libmanagement__ext_OperatingSystemImpl.c deleted file mode 100644 index 421548d0f4a5..000000000000 --- a/java/openjdk23/files/patch-src_jdk.management_unix_native_libmanagement__ext_OperatingSystemImpl.c +++ /dev/null @@ -1,89 +0,0 @@ ---- src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c.orig 2023-10-01 03:54:04 UTC -+++ src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c -@@ -58,6 +58,7 @@ - #include <unistd.h> - - #ifdef __FreeBSD__ -+#include <sys/user.h> - #include <vm/vm_param.h> - #endif - -@@ -177,23 +178,43 @@ Java_com_sun_management_internal_OperatingSystemImpl_g - } - return t_info.virtual_size; - #elif defined(__FreeBSD__) -- FILE *fp; -- unsigned long end, start; -- jlong total = 0; -+ int mib[4]; -+ struct kinfo_vmentry *kve; -+ long total = 0; -+ size_t len = 0; -+ int error; -+ char *buf, *bp, *eb; - -- if ((fp = fopen("/proc/curproc/map", "r")) == NULL) { -- throw_internal_error(env, "Unable to open /proc/curproc/map"); -+ mib[0] = CTL_KERN; -+ mib[1] = KERN_PROC; -+ mib[2] = KERN_PROC_VMMAP; -+ mib[3] = getpid(); -+ error = sysctl(mib, 4, NULL, &len, NULL, 0); -+ if (error) { -+ throw_internal_error(env, "Cannot sysctl(kern.proc.vvmap)"); - return -1; - } -- -- for (;;) { -- // Ignore everything except start and end entries -- if (fscanf(fp, "0x%lx 0x%lx %*[^\n]\n", &start, &end) != 2 || start > end) -- break; -- total += end - start; -+ len = len * 4 / 3; -+ buf = malloc(len); -+ if (buf == NULL) { -+ throw_internal_error(env, "Fail to allocate memory"); -+ return -1; - } -- -- fclose(fp); -+ error = sysctl(mib, 4, buf, &len, NULL, 0); -+ if (error) { -+ throw_internal_error(env, "Cannot sysctl(kern.proc.vvmap)"); -+ return -1; -+ } -+ bp = buf; -+ eb = buf + len; -+ while (bp < eb) { -+ kve = (struct kinfo_vmentry *)(uintptr_t)bp; -+ if (kve->kve_structsize == 0) -+ break; -+ bp += kve->kve_structsize; -+ total += kve->kve_end - kve->kve_start; -+ } -+ free(buf); - return total; - #else /* _ALLBSD_SOURCE */ - /* -@@ -403,6 +424,21 @@ Java_com_sun_management_internal_OperatingSystemImpl_g - return nfiles; - #elif defined(__OpenBSD__) - return getdtablecount(); -+#elif defined(__FreeBSD__) -+ int mib[4]; -+ int error; -+ int nfds; -+ size_t len; -+ -+ len = sizeof(nfds); -+ mib[0] = CTL_KERN; -+ mib[1] = KERN_PROC; -+ mib[2] = KERN_PROC_NFDS; -+ mib[3] = 0; -+ -+ if (sysctl(mib, 4, &nfds, &len, NULL, 0) == -1) -+ return -1; -+ return nfds; - #else /* solaris/linux */ - DIR *dirp; - struct dirent* dentp; |
