On Tue, 12 Nov 2024 13:21:04 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> Hi all, >> After [JDK-8338304](https://bugs.openjdk.org/browse/JDK-8338304), below >> configure command will generate failure `error: Could not find required tool >> for LLD`. The lld linker located in path which config with option >> `--with-toolchain-path`, but the check `UTIL_REQUIRE_PROGS(LLD, lld)` >> introduced by [JDK-8338304](https://bugs.openjdk.org/browse/JDK-8338304) was >> unable to find the lld. This PR add the condition to deal with user >> specidied `--with-toolchain-path` to find the correct lld fullpath. The >> change has beeen verified locally, trivial fix, the risk is low. >> >> >> bash configure --with-jobs=128 --with-debug-level=release >> --enable-unlimited-crypto --with-jvm-variants=server >> --with-version-opt=f4008968 --with-zlib=system --with-toolchain-type=clang >> --with-toolchain-path=/home/yansendao/software/acc/x86_64/bin > > make/autoconf/flags-ldflags.m4 line 78: > >> 76: if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test >> "x$CC_IS_USER_SUPPLIED" = xfalse; then >> 77: if test "x$TOOLCHAIN_PATH" != x; then >> 78: UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH) > > No, this is not correct. Did you test this patch *without* having lld in the > toolchain path? Doing this will remove the normal lookup in `$PATH` and only > look in `$TOOLCHAIN_PATH`. After I remove the lld binary from `$TOOLCHAIN_PATH`, such as `mv /home/yansendao/software/acc/x86_64/bin/lld /tmp/`, the configure command generate `configure: error: Could not find required tool for LLD` as expected. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21999#discussion_r1838257682