8339128: Cannot resolve user specified tool properly after JDK-8338304

Reviewed-by: erikj, ihse
This commit is contained in:
Jiangli Zhou 2024-11-02 01:11:20 +00:00
parent 3c7082a633
commit 8c1cf8fabe
2 changed files with 5 additions and 1 deletions

View File

@ -73,7 +73,9 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Clang needs the lld linker to work correctly
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
UTIL_REQUIRE_PROGS(LLD, lld)
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
UTIL_REQUIRE_PROGS(LLD, lld)
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \

View File

@ -445,6 +445,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
AC_MSG_ERROR([User supplied compiler $1=[$]$1 does not exist])
fi
fi
$1_IS_USER_SUPPLIED=true
else
# No user supplied value. Locate compiler ourselves.
@ -462,6 +463,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
$1_IS_USER_SUPPLIED=false
fi
# Now we have a compiler binary in $1. Make sure it's okay.