java/openjdk17: fix build on freebsd 16/aarch64
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_os_perf_bsd.o:
In file included from /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.18-8-1/src/hotspot/os/bsd/os_perf_bsd.cpp:38:
In file included from /usr/include/sys/user.h:52:
In file included from /usr/include/vm/pmap.h:88:
In file included from /usr/include/machine/pmap.h:46:
In file included from /usr/include/sys/systm.h:46:
/usr/include/machine/cpufunc.h:35:1: error: static declaration of 'breakpoint' follows non-static declaration
35 | breakpoint(void)
| ^
/wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.18-8-1/src/hotspot/share/utilities/breakpoint.hpp:31:17: note: previous declaration is here
31 | extern "C" void breakpoint();
| ^
1 error generated.
* All command lines available in /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.18-8-1/build/bsd-aarch64-server-release/make-support/failure-logs.
=== End of repeated output ===
Similar fix to openjdk8/25/26.
I don't know why this does not happen on other architectures or freebsd
versions.
- changed post-patch to pre-configure, this makes it a lot easier to use "make
makepatch".
Reported-by: https://portsfallout.com/fallout?port=java%2Fopenjdk
Approved-by: silence on java@ https://lists.freebsd.org/archives/freebsd-java/2026-June/003715.html
This commit is contained in:
@@ -154,7 +154,7 @@ ICONV_LDFLAGS= -L${LOCALBASE}/lib
|
||||
ICONV_LIBS= ${ICONV_LIB}
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
pre-configure:
|
||||
@${FIND} ${WRKSRC} -name '*.orig' -delete
|
||||
@${CHMOD} 755 ${WRKSRC}/configure
|
||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--- src/hotspot/os/bsd/os_perf_bsd.cpp.orig 2026-01-23 03:03:41 UTC
|
||||
+++ src/hotspot/os/bsd/os_perf_bsd.cpp
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <mach/task_info.h>
|
||||
#else
|
||||
# if !defined(__NetBSD__)
|
||||
+ #if ( defined (__aarch64__) && __FreeBSD_version >= 160000 )
|
||||
+ // do not redefine breakpoint
|
||||
+ #define _MACHINE_CPUFUNC_H_
|
||||
+ #endif
|
||||
#include <sys/user.h>
|
||||
# endif
|
||||
#include <sys/sched.h>
|
||||
Reference in New Issue
Block a user