< prev index next >

common/autoconf/toolchain.m4

Print this page
@  rev 2182 : 8148351: Only display resolved symlink for compiler, do not change path
|  Reviewed-by: duke
o  rev 2181 : 8031668: TOOLCHAIN_FIND_COMPILER unexpectedly resolves symbolic links
|  Reviewed-by: erikj, ihse
~

*** 532,563 **** fi # Now we have a compiler binary in $1. Make sure it's okay. BASIC_FIXUP_EXECUTABLE($1) TEST_COMPILER="[$]$1" ! # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links ! # to 'xlc' but it is crucial that we invoke the compiler with the right name! ! if test "x$OPENJDK_BUILD_OS" != xaix; then ! # FIXME: This test should not be needed anymore; we don't do that for any platform. AC_MSG_CHECKING([resolved symbolic links for $1]) ! BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) ! AC_MSG_RESULT([$TEST_COMPILER]) ! fi AC_MSG_CHECKING([if $1 is disguised ccache]) ! ! COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` if test "x$COMPILER_BASENAME" = "xccache"; then AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. # We want to control ccache invocation ourselves, so ignore this cc and try # searching again. # Remove the path to the fake ccache cc from the PATH RETRY_COMPILER_SAVED_PATH="$PATH" COMPILER_DIRNAME=`$DIRNAME [$]$1` PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" - # Try again looking for our compiler AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) PATH="$RETRY_COMPILER_SAVED_PATH" --- 532,561 ---- fi # Now we have a compiler binary in $1. Make sure it's okay. BASIC_FIXUP_EXECUTABLE($1) TEST_COMPILER="[$]$1" ! AC_MSG_CHECKING([resolved symbolic links for $1]) ! SYMLINK_ORIGINAL="$TEST_COMPILER" ! BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL) ! if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then ! AC_MSG_RESULT([no symlink]) ! else ! AC_MSG_RESULT([$SYMLINK_ORIGINAL]) AC_MSG_CHECKING([if $1 is disguised ccache]) ! COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"` if test "x$COMPILER_BASENAME" = "xccache"; then AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. # We want to control ccache invocation ourselves, so ignore this cc and try # searching again. # Remove the path to the fake ccache cc from the PATH RETRY_COMPILER_SAVED_PATH="$PATH" COMPILER_DIRNAME=`$DIRNAME [$]$1` PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" # Try again looking for our compiler AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) PATH="$RETRY_COMPILER_SAVED_PATH"
*** 566,575 **** --- 564,574 ---- AC_MSG_RESULT([$PROPER_COMPILER_$1]) $1="$PROPER_COMPILER_$1" else AC_MSG_RESULT([no, keeping $1]) fi + fi TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) ]) # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
< prev index next >