RFR: 8300550: BASIC_JVM_LIBS is set for buildjdk even if this is incorrect

Magnus Ihse Bursie ihse at openjdk.org
Wed Jan 18 16:21:10 UTC 2023


We setup a bunch of default library (`-l<lib>`) flags for the JVM compilation in the variable BASIC_JVM_LIBS in LIB_SETUP_LIBRARIES. Almost all of these are dependent on OS, and are thus safe to use both the the target and build compilation (since we do not support cross-OS compilation). However, the recently added libatomic is only added for certain CPUs. This means that it needs to be different for the build and target CPUs, but we currently do not differentiate these. The typical end result of this is that when you try to cross-compile, the buildjdk will be build with flags that should only have been used when building for the target platform, and this can cause failures at runtime (e.g. if no libatomic is installed).

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

Commit messages:
 - 8300550: BASIC_JVM_LIBS is set for buildjdk even if this is incorrect

Changes: https://git.openjdk.org/jdk/pull/12075/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12075&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8300550
  Stats: 54 lines in 1 file changed: 30 ins; 21 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/12075.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12075/head:pull/12075

PR: https://git.openjdk.org/jdk/pull/12075



More information about the build-dev mailing list