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 A happy FreeBSD user passed by, was delighted to see that this PR didn't break any build on other platforms, that even the tests were passing on those, and decided to give this a try on his system. So he installed some stuff with `pkg install bash autoconf gmake zip alsa-lib cups fontconfig openjdk25` And then ran the following command: $ bash configure --with-toolchain-type=clang --with-alsa-include=/usr/local/include/alsa --with-cups-include=/usr/local/include --with-fontconfig-include=/usr/local/include (Noting that `configure` was not executable) To get the following output: FREEBSD:~/bsd-port $ bash configure --with-toolchain-type=clang --with-alsa-include=/usr/local/include/alsa --with-cups-include=/usr/local/include --with-fontconfig-include=/usr/local/includ e configure: Configuration created at Tue Mar 10 20:12:50 CET 2026. checking for basename... /usr/bin/basename checking for dirname... /usr/bin/dirname checking for file... /usr/bin/file checking for ldd... /usr/bin/ldd checking for echo... echo [builtin] checking for tr... /usr/bin/tr checking for uname... /usr/bin/uname checking for wc... /usr/bin/wc checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for locale... /usr/bin/locale checking for cygpath... [not found] checking for wslpath... [not found] checking for cmd.exe... [not found] checking for lsb_release... [not found] checking build system type... x86_64-unknown-freebsd15.0 checking host system type... x86_64-unknown-freebsd15.0 checking target system type... x86_64-unknown-freebsd15.0 checking openjdk-build os-cpu... bsd-x86_64 ...[blah, stripped for brevity] ==================================================== A new configuration has been successfully created in /home/antonio/bsd-port/build/bsd-x86_64-server-release using configure arguments '--with-toolchain-type=clang --with-alsa-include=/usr/local/include/alsa --with-cups-include=/usr/local/include --with-fontconfig-include=/usr/local/include'. Configuration summary: * Name: bsd-x86_64-server-release * Debug level: release * HS debug level: product * JVM variants: server * JVM features: server: 'cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs' * OpenJDK target: OS: bsd, CPU architecture: x86, address length: 64 * Version string: 27-internal-adhoc.antonio.bsd-port (27-internal) * Source date: 1773169971 (2026-03-10T19:12:51Z) Tools summary: * Boot JDK: openjdk version "25.0.1" 2025-10-21 OpenJDK Runtime Environment (build 25.0.1+8-freebsd-1) OpenJDK 64-Bit Server VM (build 25.0.1+8-freebsd-1, mixed mode, sharing) (at /usr/local) * Toolchain: clang (clang/LLVM) * C Compiler: Version 19.1.7 (at /usr/bin/clang) * C++ Compiler: Version 19.1.7 (at /usr/bin/clang++) Build performance summary: * Build jobs: 8 * Memory limit: 16349 MB The user didn't dare to try to make the resulting build configuration at that moment, because the dinner was getting cold. While having dinner he thought that many other more experienced FreeBSD users could be interested in giving this a run in their own systems, or even contribute to this somehow. But then maybe those users didn't know about this effort. After a long working day, the user fell into a deep sleep, dreaming with Java on FreeBSD. ------------- PR Comment: https://git.openjdk.org/bsd-port/pull/4#issuecomment-4033878911
