RFR: 8372705: The riscv-64 cross-compilation build is failing in the CI

David Holmes dholmes at openjdk.org
Wed Dec 3 00:38:24 UTC 2025


On Tue, 2 Dec 2025 22:18:06 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> In [JDK-8371626](https://bugs.openjdk.org/browse/JDK-8371626) a new linker flag was introduced that only works with the Gold linker. The way the flag is added is not compatible with cross compilation configurations where the "build JDK" is built on the fly. In such a configuration, we are setting up two distinct toolchains, the TARGET (basically the regular one, with no variable prefixes) and the BUILD (an extra toolchain used to compile for the build platform, variables have the prefix "BUILD_").
> 
> This patch adjusts the adding of this linker flag so that it's conditionally added to each of the BUILD and TARGET linker flags depending on if the corresponding toolchain is using the Gold linker.
> 
> I have verified with local builds, both native and cross, both that the builds succeed and that the expected flag is added when it should be. I've also run the full set of automated builds in our internal build and test system.

Looks good to me. Thanks for the fix @erikj79

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28619#pullrequestreview-3532668475


More information about the build-dev mailing list