On Mon, 9 Mar 2026 19:21:08 GMT, Harald Eilertsen <[email protected]> wrote:

> This basically allows configure to complete and set up a configuration 
> suitable for building the BSD port for supported platforms (FreeBSD, OpenBSD 
> and NetBSD.)
> 
> The flag `_BSDONLY_SOURCE` is defined for all the BSD's _except_ for Apple 
> MacOS, while the existing `_ALLBSD_SOURCE` _includes_ Apple MacOS.
> 
> For the BSD's we set the `OPENJDK_TARGET_OS_ENV` variable to distinct values 
> reflecting the BSD variant being built. This is used to distinguish build 
> flags, library locations and what libraries and modules to include for the 
> various builds.
> 
> As an example, FreeBSD includes the ALSA library, and should build the 
> Serviceability Agent, while the other BSD's do not.
> 
> This work was sponsored by: The FreeBSD Foundation

LGTM. Small nit inline, feel free to ignore it though.

make/autoconf/build-performance.m4 line 84:

> 82:       if test "$MEMORY_SIZE" -gt "$RLIMIT_DATA"; then
> 83:         MEMORY_SIZE=$RLIMIT_DATA
> 84:       fi

Curious, why only OpenBSD? This looks like it should be valid for all BSDs or 
even for all Unices.

It may depend on how and where the libc allocates memory for malloc, I guess? 
Is that different for the various BSDs?

make/autoconf/platform.m4 line 498:

> 496:   if test "x$OPENJDK_$1_OS" = xbsd -o "x$OPENJDK_$1_OS" = xlinux \
> 497:       && test "x$OPENJDK_$1_CPU" = xx86; then
> 498:     # On linux and BSD only, we replace x86 with i386.

Small nit, I had to read twice to see this is correct. Maybe a `{ [ "x$OS" = 
"xbsd" ] || [ "$OS" = "xlinux" ]; } && [ "x$CPU" = "xx86" ];` would be clearer. 
Up to you.

-------------

Marked as reviewed by stuefe (no project role).

PR Review: https://git.openjdk.org/bsd-port/pull/4#pullrequestreview-3962221562
PR Review Comment: 
https://git.openjdk.org/bsd-port/pull/4#discussion_r2948122627
PR Review Comment: 
https://git.openjdk.org/bsd-port/pull/4#discussion_r2948169219

Reply via email to