< prev index next >

common/autoconf/toolchain.m4

Print this page




 429       AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
 430     fi
 431   fi
 432 
 433   # Now we have a compiler binary in $1. Make sure it's okay.
 434   BASIC_FIXUP_EXECUTABLE($1)
 435   TEST_COMPILER="[$]$1"
 436 
 437   AC_MSG_CHECKING([resolved symbolic links for $1])
 438   SYMLINK_ORIGINAL="$TEST_COMPILER"
 439   BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
 440   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
 441     AC_MSG_RESULT([no symlink])
 442   else
 443     AC_MSG_RESULT([$SYMLINK_ORIGINAL])
 444 
 445     # We can't handle ccache by gcc wrappers, since we need to know if we're
 446     # using ccache. Instead ccache usage must be controlled by a configure option.
 447     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
 448     if test "x$COMPILER_BASENAME" = "xccache"; then

 449       AC_MSG_NOTICE([Please use --enable-ccache instead of providing a wrapped compiler.])
 450       AC_MSG_ERROR([$TEST_COMPILER is a symbolic link to ccache. This is not supported.])

 451     fi
 452   fi
 453 
 454   TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
 455 ])
 456 
 457 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
 458 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
 459 # archiver (AR). Verify that the compilers are correct according to the
 460 # toolchain type.
 461 AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
 462 [
 463   #
 464   # Setup the compilers (CC and CXX)
 465   #
 466   TOOLCHAIN_FIND_COMPILER([CC], [C], $TOOLCHAIN_CC_BINARY)
 467   # Now that we have resolved CC ourself, let autoconf have its go at it
 468   AC_PROG_CC([$CC])
 469 
 470   TOOLCHAIN_FIND_COMPILER([CXX], [C++], $TOOLCHAIN_CXX_BINARY)




 429       AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
 430     fi
 431   fi
 432 
 433   # Now we have a compiler binary in $1. Make sure it's okay.
 434   BASIC_FIXUP_EXECUTABLE($1)
 435   TEST_COMPILER="[$]$1"
 436 
 437   AC_MSG_CHECKING([resolved symbolic links for $1])
 438   SYMLINK_ORIGINAL="$TEST_COMPILER"
 439   BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
 440   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
 441     AC_MSG_RESULT([no symlink])
 442   else
 443     AC_MSG_RESULT([$SYMLINK_ORIGINAL])
 444 
 445     # We can't handle ccache by gcc wrappers, since we need to know if we're
 446     # using ccache. Instead ccache usage must be controlled by a configure option.
 447     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
 448     if test "x$COMPILER_BASENAME" = "xccache"; then
 449       if test "x$enable_ccache" != "xyes"; then
 450         AC_MSG_NOTICE([Please use --enable-ccache instead of providing a wrapped compiler.])
 451         AC_MSG_ERROR([$TEST_COMPILER is a symbolic link to ccache. This is not supported.])
 452       fi
 453     fi
 454   fi
 455 
 456   TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
 457 ])
 458 
 459 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
 460 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
 461 # archiver (AR). Verify that the compilers are correct according to the
 462 # toolchain type.
 463 AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
 464 [
 465   #
 466   # Setup the compilers (CC and CXX)
 467   #
 468   TOOLCHAIN_FIND_COMPILER([CC], [C], $TOOLCHAIN_CC_BINARY)
 469   # Now that we have resolved CC ourself, let autoconf have its go at it
 470   AC_PROG_CC([$CC])
 471 
 472   TOOLCHAIN_FIND_COMPILER([CXX], [C++], $TOOLCHAIN_CXX_BINARY)


< prev index next >