8035725: Must keep microsoft VS_PATH on PATH after toolchain detection

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2014-02-25 15:19:32 +01:00
parent e00f753d87
commit e7066f3923
2 changed files with 24 additions and 18 deletions

View File

@ -4220,7 +4220,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1393244882
DATE_WHEN_GENERATED=1393327380
###############################################################################
#
@ -26393,18 +26393,10 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ORG_CXXFLAGS="$CXXFLAGS"
ORG_OBJCFLAGS="$OBJCFLAGS"
# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
# For solaris we really need solaris tools, and not the GNU equivalent.
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
# so add that to path before starting to probe.
# FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
PATH="/usr/ccs/bin:$PATH"
fi
# On Windows, we need to detect the visual studio installation first.
# This will change the PATH, but we need to keep that new PATH even
# after toolchain detection is done, since the compiler (on x86) uses
# it for DLL resolution in runtime.
if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
# Store path to cygwin link.exe to help excluding it when searching for
@ -27215,6 +27207,17 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
fi
# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
# For solaris we really need solaris tools, and not the GNU equivalent.
# The build tools on Solaris reside in /usr/ccs (C Compilation System),
# so add that to path before starting to probe.
# FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
PATH="/usr/ccs/bin:$PATH"
fi
# Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
# override all other locations.
if test "x$TOOLS_DIR" != x; then

View File

@ -164,6 +164,14 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
ORG_CXXFLAGS="$CXXFLAGS"
ORG_OBJCFLAGS="$OBJCFLAGS"
# On Windows, we need to detect the visual studio installation first.
# This will change the PATH, but we need to keep that new PATH even
# after toolchain detection is done, since the compiler (on x86) uses
# it for DLL resolution in runtime.
if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
fi
# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
@ -175,11 +183,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
PATH="/usr/ccs/bin:$PATH"
fi
# On Windows, we need to detect the visual studio installation first.
if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
fi
# Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
# override all other locations.
if test "x$TOOLS_DIR" != x; then
@ -663,7 +666,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
# Check for extra potential brokenness.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# On Windows, double-check that we got the right compiler.
CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
if test "x$COMPILER_CPU_TEST" != "x80x86"; then