RFR: 8303485: Replacing os.name for operating system customization
Justin King
jcking at openjdk.org
Fri Mar 10 14:25:20 UTC 2023
On Wed, 8 Mar 2023 19:15:16 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> Improvements to support OS specific customization for JDK internal use:
> - To select values and code; allowing elimination of unused code and values
> - Optionally evaluated by build processes, compilation, or archiving (i.e. CDS)
> - Simple API to replace adhoc comparisons with `os.name`
> - Clear and consistent use across build, runtime, and JDK modules
>
> The PR includes updates within java.base to use the new API.
> > Has this totally killed of BSD support on the JDK side? I thought building non-macOS BSD was still viable, but perhaps not - certainly not after this change.
>
> The macOS port in 7u4 was based on a BSD port and there was a time when it was possible to build. Right now, we have src/hotspot/os/bsd and native code in the libs that is compiled in with _ALLBSD_SOURCE. It's sad to see the BSD port bit rot but if it's not maintained or tested in the OpenJDK project then the changes proposed here may be okay. For porters then know which code needs to be ported is important, ideally there would be a compile or build time if someone significant is missing.
Yes it is unfortunate. It would be nice if NetBSD, FreeBSD, OpenBSD, and friends would collaborate. I think the majority of their changes are fixing build issues and making AWT/Swing use X11 instead of macOS-specific stuff (Quartz or Cocoa or whatever). Maybe I'll go poke them eventually.
-------------
PR: https://git.openjdk.org/jdk/pull/12931
More information about the build-dev
mailing list