RFR: 8302460: System C++ Compiler for cross compiling gcc is dangerously wrong
Magnus Ihse Bursie
ihse at openjdk.org
Thu Feb 16 10:04:25 UTC 2023
On Tue, 14 Feb 2023 14:32:10 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> Full details in linked entry, man did this give me a scare on my local branch
>
> All C++ compilers for the build operating system are under the name c++ (when selected compiler is gcc), but when searching for BUILD_CXX the compiler given priority is an uppercase CC, and then g++, which is not correct since this simply links to the C compiler instead
We always try to find a more specific tool first, then fall back to a more generic. So `g++` should be checked before `c++`, since we know we will get gcc in the first case, but not the second.
If we search for `CC` in the path but finds `cc`, then there is a bug in how `UTIL_REQUIRE_PROGS` looks up stuff in the path. Feel free to investigate and/or fix.
-------------
PR: https://git.openjdk.org/jdk/pull/12558
More information about the build-dev
mailing list