On Fri, 20 Mar 2026 08:56:52 GMT, Harald Eilertsen <[email protected]> wrote:
>> Updates the makefiles to set up for compilation and building for *BSD. >> This is a cleaned up diff towards the existing BSD port from the >> battleblow/jdk repository. >> >> Some parts have been held back for later PRs, mainly because I expect >> them to require more thorough review. (Some is also probably outdated, >> and we'll go through those first.) >> >> This work is sponsored by The FreeBSD Foundation. >> >> Co-authored-by: @battleblow >> Co-authored-by: @bsdkurt > > Harald Eilertsen has updated the pull request incrementally with one > additional commit since the last revision: > > Adjust FreeBSD Hsdis support to apply to *BSD. make/RunTestsPrebuilt.gmk line 172: > 170: else ifeq ($(UNAME_OS), Darwin) > 171: OPENJDK_TARGET_OS := macosx > 172: else ifneq ($(findstring BSD,$(UNAME_OS)),) We prefer space after comma when possible. https://openjdk.org/groups/build/doc/code-conventions.html make/common/JdkNativeCompilation.gmk line 240: > 238: $1_$2_STATIC_LIBRARY := true > 239: $1_LIBS += $(LIBZ_LIBS) $(LIBPTHREAD) > 240: endif I see that this is mimicking the line above, but this file isn't meant to be used for these kinds of exceptions. I also noticed that there is a conditional in java.base/lib/CoreLibraries.gmk handling the static part. It would be nice if this could all be handled there instead. make/common/native/Link.gmk line 218: > 216: endif > 217: ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.netbsd) > 218: /usr/sbin/paxctl +m $$@ I don't know what this tool is, but in general we prefer looking up tools in configure and using them through a variable. This allows for a uniform way of overriding any tool at configure time. make/modules/java.desktop/Lib.gmk line 41: > 39: > 40: ifeq ($(call isTargetOs, aix), false) > 41: ifneq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd) Use isTargetOsEnv? Also please fix indentation of the block. make/modules/jdk.sctp/Java.gmk line 50: > 48: endif > 49: > 50: ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd) Use macro? Same below. make/modules/jdk.sctp/Lib.gmk line 34: > 32: SCTP_SUPPORTED=true > 33: endif > 34: ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.freebsd) Could use `$(call Or,...)` to avoid duplication. make/test/JtregNativeJdk.gmk line 91: > 89: BUILD_JDK_JTREG_EXECUTABLES_LIBS_exelauncher := -pthread > 90: endif > 91: ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd) macro ------------- PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2966087469 PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2965872647 PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2965834064 PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2965882085 PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2966072446 PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2966081291 PR Review Comment: https://git.openjdk.org/bsd-port/pull/6#discussion_r2966082932
