git: eed3230fe4c9 - main - java/openjdk23: fix build on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 18 Jan 2025 15:42:12 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=eed3230fe4c95d75f9c587ec8f714ca2404a5805 commit eed3230fe4c95d75f9c587ec8f714ca2404a5805 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2025-01-18 11:45:05 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2025-01-18 15:41:59 +0000 java/openjdk23: fix build on powerpc64* Copy patch from java/openjdk22 to fix: Error: dl failure on line 564 Error: failed /wrkdirs/usr/ports/java/openjdk23/work/jdk23u-jdk-23.0.1-11-1/build/bsd-ppc64-server-release/jdk/lib/server/libjvm.so, because /wrkdirs/usr/ports/java/openjdk23/work/jdk23u-jdk-23.0.1-11-1/build/bsd-ppc64-server-release/jdk/lib/server/libjvm.so: Undefined symbol "_ZN2os27current_stack_base_and_sizeEPPhPm" --- ...h-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) 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 new file mode 100644 index 000000000000..dda6fd26cce0 --- /dev/null +++ b/java/openjdk23/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp @@ -0,0 +1,44 @@ +--- 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"); + } + + /////////////////////////////////////////////////////////////////////////////