--- old/common/autoconf/generated-configure.sh 2014-02-12 15:47:18.664208002 +0100 +++ new/common/autoconf/generated-configure.sh 2014-02-12 15:47:18.524207255 +0100 @@ -634,6 +634,7 @@ ENABLE_INTREE_EC SALIB_NAME HOTSPOT_MAKE_ARGS +MSVCR_DLL LIBCXX LLVM_LIBS LLVM_LDFLAGS @@ -661,11 +662,8 @@ X_CFLAGS XMKMF FIXPATH -CXXFLAGS_DEBUG_SYMBOLS -CFLAGS_DEBUG_SYMBOLS ZIP_DEBUGINFO_FILES ENABLE_DEBUG_SYMBOLS -USING_BROKEN_SUSE_LD COMPILER_SUPPORTS_TARGET_BITS_FLAG ZERO_ARCHFLAG LDFLAGS_CXX_JDK @@ -677,13 +675,9 @@ CXXFLAGS_JDKLIB CFLAGS_JDKEXE CFLAGS_JDKLIB -MACOSX_VERSION_MIN -PACKAGE_PATH LEGACY_EXTRA_LDFLAGS LEGACY_EXTRA_CXXFLAGS LEGACY_EXTRA_CFLAGS -CXX_FLAG_DEPS -C_FLAG_DEPS CXX_O_FLAG_NONE CXX_O_FLAG_NORM CXX_O_FLAG_HI @@ -692,60 +686,65 @@ C_O_FLAG_NORM C_O_FLAG_HI C_O_FLAG_HIGHEST -POST_MCS_CMD -POST_STRIP_CMD -SET_EXECUTABLE_ORIGIN -SET_SHARED_LIBRARY_ORIGIN -CXX_FLAG_REORDER -C_FLAG_REORDER +CXXFLAGS_DEBUG_SYMBOLS +CFLAGS_DEBUG_SYMBOLS +CXX_FLAG_DEPS +C_FLAG_DEPS SET_SHARED_LIBRARY_MAPFILE SET_SHARED_LIBRARY_NAME +SET_SHARED_LIBRARY_ORIGIN +SET_EXECUTABLE_ORIGIN SHARED_LIBRARY_FLAGS -EXE_SUFFIX -STATIC_LIBRARY_SUFFIX -SHARED_LIBRARY_SUFFIX -LIBRARY_PREFIX -STATIC_LIBRARY -SHARED_LIBRARY -OBJ_SUFFIX -COMPILER_NAME +CXX_FLAG_REORDER +C_FLAG_REORDER +RC_FLAGS +AR_OUT_OPTION +LD_OUT_OPTION +EXE_OUT_OPTION +CC_OUT_OPTION +POST_MCS_CMD +POST_STRIP_CMD +ARFLAGS +COMPILER_TARGET_BITS_FLAG JT_HOME JTREGEXE -LIPO +USING_BROKEN_SUSE_LD +MACOSX_VERSION_MIN +PACKAGE_PATH +LDEXECXX +LDEXE +USE_CLANG +HOTSPOT_LD +HOTSPOT_CXX +HOTSPOT_RC +HOTSPOT_MT +BUILD_LD +BUILD_CXX +BUILD_CC ac_ct_OBJDUMP OBJDUMP ac_ct_OBJCOPY OBJCOPY -ac_ct_STRIP ac_ct_NM +ac_ct_STRIP MCS -STRIP GNM NM -AS -CXXCPP -CPP -COMPILER_TYPE -RC_FLAGS +STRIP DUMPBIN -WINAR -HOTSPOT_RC -HOTSPOT_MT RC MT -WINLD -HOTSPOT_LD -HOTSPOT_CXX -ARFLAGS +LIPO +ac_ct_OBJC +OBJCFLAGS +OBJC ac_ct_AR AR -LDEXECXX +AS LDCXX -LDEXE LD -ac_ct_OBJC -OBJCFLAGS -OBJC +CXXCPP +CPP ac_ct_CXX CXXFLAGS CXX @@ -753,7 +752,6 @@ PROPER_COMPILER_CXX TOOLS_DIR_CXX POTENTIAL_CXX -COMPILER_TARGET_BITS_FLAG OBJEXT EXEEXT ac_ct_CC @@ -765,18 +763,17 @@ PROPER_COMPILER_CC TOOLS_DIR_CC POTENTIAL_CC -BUILD_LD -BUILD_CXX -BUILD_CC -MSVCR_DLL VS_PATH VS_LIB VS_INCLUDE CYGWIN_LINK -AR_OUT_OPTION -LD_OUT_OPTION -EXE_OUT_OPTION -CC_OUT_OPTION +EXE_SUFFIX +OBJ_SUFFIX +STATIC_LIBRARY +SHARED_LIBRARY +STATIC_LIBRARY_SUFFIX +SHARED_LIBRARY_SUFFIX +LIBRARY_PREFIX BUILD_HOTSPOT HOTSPOT_DIST BUILD_OUTPUT @@ -1048,10 +1045,7 @@ with_override_nashorn with_override_jdk with_import_hotspot -with_msvcr_dll -with_dxsdk -with_dxsdk_lib -with_dxsdk_include +with_toolchain_type with_jtreg with_extra_cflags with_extra_cxxflags @@ -1072,6 +1066,10 @@ with_giflib with_zlib with_stdc__lib +with_msvcr_dll +with_dxsdk +with_dxsdk_lib +with_dxsdk_include with_num_cores with_memory_size with_jobs @@ -1148,9 +1146,6 @@ JAR NATIVE2ASCII JARSIGNER -BUILD_CC -BUILD_CXX -BUILD_LD CC CFLAGS LDFLAGS @@ -1159,19 +1154,22 @@ CXX CXXFLAGS CCC -OBJC -OBJCFLAGS -AR CPP CXXCPP AS +AR +OBJC +OBJCFLAGS +LIPO +STRIP NM GNM -STRIP MCS OBJCOPY OBJDUMP -LIPO +BUILD_CC +BUILD_CXX +BUILD_LD JTREGEXE XMKMF FREETYPE_CFLAGS @@ -1893,14 +1891,8 @@ --with-import-hotspot import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source - --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows - only) [probed] - --with-dxsdk Deprecated. Option is kept for backwards - compatibility and is ignored - --with-dxsdk-lib Deprecated. Option is kept for backwards - compatibility and is ignored - --with-dxsdk-include Deprecated. Option is kept for backwards - compatibility and is ignored + --with-toolchain-type the toolchain type (or family) to use, 'list' to + show all available [platform dependent] --with-jtreg Regression Test Harness [probed] --with-extra-cflags extra flags to be used when compiling jdk c-files --with-extra-cxxflags extra flags to be used when compiling jdk c++-files @@ -1927,6 +1919,14 @@ force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback + --with-msvcr-dll copy this msvcr100.dll into the built JDK (Windows + only) [probed] + --with-dxsdk Deprecated. Option is kept for backwards + compatibility and is ignored + --with-dxsdk-lib Deprecated. Option is kept for backwards + compatibility and is ignored + --with-dxsdk-include Deprecated. Option is kept for backwards + compatibility and is ignored --with-num-cores number of cores in the build system, e.g. --with-num-cores=8 [probed] --with-memory-size memory (in MB) available in the build system, e.g. @@ -2004,9 +2004,6 @@ NATIVE2ASCII Override default value for NATIVE2ASCII JARSIGNER Override default value for JARSIGNER - BUILD_CC Override default value for BUILD_CC - BUILD_CXX Override default value for BUILD_CXX - BUILD_LD Override default value for BUILD_LD CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a @@ -2016,19 +2013,22 @@ you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags - OBJC Objective C compiler command - OBJCFLAGS Objective C compiler flags - AR Override default value for AR CPP C preprocessor CXXCPP C++ preprocessor AS Override default value for AS + AR Override default value for AR + OBJC Objective C compiler command + OBJCFLAGS Objective C compiler flags + LIPO Override default value for LIPO + STRIP Override default value for STRIP NM Override default value for NM GNM Override default value for GNM - STRIP Override default value for STRIP MCS Override default value for MCS OBJCOPY Override default value for OBJCOPY OBJDUMP Override default value for OBJDUMP - LIPO Override default value for LIPO + BUILD_CC Override default value for BUILD_CC + BUILD_CXX Override default value for BUILD_CXX + BUILD_LD Override default value for BUILD_LD JTREGEXE Override default value for JTREGEXE XMKMF Path to xmkmf, Makefile generator for X Window System FREETYPE_CFLAGS @@ -2199,21 +2199,20 @@ } # ac_fn_cxx_try_compile -# ac_fn_objc_try_compile LINENO -# ----------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_objc_try_compile () +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" + if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -2221,26 +2220,26 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_objc_werror_flag" || + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_objc_try_compile +} # ac_fn_c_try_cpp -# ac_fn_c_try_cpp LINENO -# ---------------------- +# ac_fn_cxx_try_cpp LINENO +# ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () +ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" @@ -2259,7 +2258,7 @@ fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 @@ -2272,22 +2271,23 @@ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +} # ac_fn_cxx_try_cpp -# ac_fn_cxx_try_cpp LINENO -# ------------------------ -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_cpp () +# ac_fn_objc_try_compile LINENO +# ----------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_objc_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -2295,21 +2295,21 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test $ac_status = 0; } && { + test -z "$ac_objc_werror_flag" || test ! -s conftest.err - }; then : + } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_cxx_try_cpp +} # ac_fn_objc_try_compile # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- @@ -3658,7 +3658,80 @@ # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle in the LICENSE file that accompanied this code. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + + + + +# Documentation on common flags used for solstudio in HIGHEST. +# +# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be +# done with care, there are some assumptions below that need to +# be understood about the use of pointers, and IEEE behavior. +# +# -fns: Use non-standard floating point mode (not IEEE 754) +# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754) +# -fsingle: Use single precision floating point with 'float' +# -xalias_level=basic: Assume memory references via basic pointer types do not alias +# (Source with excessing pointer casting and data access with mixed +# pointer types are not recommended) +# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions +# (If you expect perfect errno behavior, do not use this) +# -xdepend: Loop data dependency optimizations (need -xO3 or higher) +# -xrestrict: Pointer parameters to functions do not overlap +# (Similar to -xalias_level=basic usage, but less obvious sometimes. +# If you pass in multiple pointers to the same data, do not use this) +# -xlibmil: Inline some library routines +# (If you expect perfect errno behavior, do not use this) +# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED) +# (If you expect perfect errno behavior, do not use this) +# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now + + # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore. + # Bug? + #if test "x$OPENJDK_TARGET_CPU" = xsparc; then + # CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" + # CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" + #fi + + + + + + +# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE], +# [RUN-IF-FALSE]) +# ------------------------------------------------------------ +# Check that the c and c++ compilers support an argument + + + + +# +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -3780,7 +3853,7 @@ # -# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -3844,7 +3917,7 @@ # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -3884,6 +3957,8 @@ + + # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -3984,7 +4059,7 @@ # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -4008,38 +4083,72 @@ # questions. # -# $1 = compiler to test (CC or CXX) -# $2 = human readable name of compiler (C or C++) +######################################################################## +# This file is responsible for detecting, verifying and setting up the +# toolchain, i.e. the compiler, linker and related utilities. It will setup +# proper paths to the binaries, but it will not setup any flags. +# +# The binaries used is determined by the toolchain type, which is the family of +# compilers and related tools that are used. +######################################################################## +# Setup a number of variables describing how native output files are +# named on this platform/toolchain. +# Determine which toolchain type to use, and make sure it is valid for this +# platform. Setup various information about the selected toolchain. -# $1 = compiler to test (CC or CXX) -# $2 = human readable name of compiler (C or C++) -# $3 = list of compiler names to search for +# Before we start detecting the toolchain executables, we might need some +# special setup, e.g. additional paths etc. + +# Restore path, etc +# Check if a compiler is of the toolchain type we expect, and save the version +# information from it. If the compiler does not match the expected type, +# this function will abort using AC_MSG_ERROR. If it matches, the version will +# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and +# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING. +# +# $1 = compiler to test (CC or CXX) +# $2 = human readable name of compiler (C or C++) +# Try to locate the given C or C++ compiler in the path, or otherwise. +# +# $1 = compiler to test (CC or CXX) +# $2 = human readable name of compiler (C or C++) +# $3 = list of compiler names to search for +# Detect the core components of the toolchain, i.e. the compilers (CC and CXX), +# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the +# archiver (AR). Verify that the compilers are correct according to the +# toolchain type. +# Setup additional tools that is considered a part of the toolchain, but not the +# core part. Many of these are highly platform-specific and do not exist, +# and/or are not needed on all platforms. +# Setup the build tools (i.e, the compiler and linker used to build programs +# that should be run on the build platform, not the target platform, as a build +# helper). Since the non-cross-compile case uses the normal, target compilers +# for this, we can only do this after these have been setup. -# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE], -# [RUN-IF-FALSE]) -# ------------------------------------------------------------ -# Check that the c and c++ compilers support an argument +# Setup legacy variables that is still needed as alternative ways to refer to +# parts of the toolchain. +# Do some additional checks on the detected tools. -# Setup the JTREG paths +# Setup the JTReg Regression Test Harness. # @@ -4092,7 +4201,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1392111785 +DATE_WHEN_GENERATED=1392216145 ############################################################################### # @@ -15156,8 +15265,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -15513,8 +15620,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -15867,8 +15972,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -16226,8 +16329,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -16579,8 +16680,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -26107,219 +26206,167 @@ ############################################################################### # -# Setup the toolchain (compilers etc), i.e. the tools that need to be -# cross-compilation aware. +# Setup the toolchain (compilers etc), i.e. tools used to compile and process +# native code. # ############################################################################### +# First determine the toolchain type (compiler family) - ############################################################################### - # - # Configure the development tool paths and potential sysroot. - # - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - # The option used to specify the target .o,.a or .so file. - # When compiling, how to specify the to be created object file. - CC_OUT_OPTION='-o$(SPACE)' - # When linking, how to specify the to be created executable. - EXE_OUT_OPTION='-o$(SPACE)' - # When linking, how to specify the to be created dynamically linkable library. - LD_OUT_OPTION='-o$(SPACE)' - # When archiving, how to specify the to be create static archive for object files. - AR_OUT_OPTION='rcs$(SPACE)' - - - - - -# Locate the actual tools - - -# Check whether --with-jtreg was given. -if test "${with_jtreg+set}" = set; then : - withval=$with_jtreg; -else - with_jtreg=no + AVAILABLE_TOOLCHAINS_linux="gcc clang solstudio xlc" + AVAILABLE_TOOLCHAINS_solaris="solstudio gcc clang" + AVAILABLE_TOOLCHAINS_macosx="gcc clang" + AVAILABLE_TOOLCHAINS_aix="xlc gcc" + AVAILABLE_TOOLCHAINS_windows="microsoft gcc" + + TOOLCHAIN_DESCRIPTION_clang="clang/LLVM" + TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection" + TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio" + TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio" + TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++" + + +# Check whether --with-toolchain-type was given. +if test "${with_toolchain_type+set}" = set; then : + withval=$with_toolchain_type; fi - if test "x$with_jtreg" = xno; then - # jtreg disabled - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 -$as_echo_n "checking for jtreg... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - else - if test "x$with_jtreg" != xyes; then - # with path specified. - JT_HOME="$with_jtreg" - fi - - if test "x$JT_HOME" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 -$as_echo_n "checking for jtreg... " >&6; } - - # use JT_HOME enviroment var. - - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # Input might be given as Windows format, start by converting to - # unix format. - path="$JT_HOME" - new_path=`$CYGPATH -u "$path"` - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file precense. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5 - fi + # Use indirect variable referencing + toolchain_var_name=AVAILABLE_TOOLCHAINS_$OPENJDK_BUILD_OS + AVAILABLE_TOOLCHAINS=${!toolchain_var_name} + # First toolchain type in the list is the default + DEFAULT_TOOLCHAIN=${AVAILABLE_TOOLCHAINS%% *} + + if test "x$with_toolchain_type" = xlist; then + # List all toolchains + { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are available on this platform:" >&5 +$as_echo "$as_me: The following toolchains are available on this platform:" >&6;} + for toolchain in $AVAILABLE_TOOLCHAINS; do + toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain + TOOLCHAIN_DESCRIPTION=${!toolchain_var_name} + $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION" + done - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. + exit 0 + elif test "x$with_toolchain_type" != x; then + # User override; check that it is valid + if test "x${AVAILABLE_TOOLCHAINS/$with_toolchain_type/}" = "x${AVAILABLE_TOOLCHAINS}"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5 +$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Available toolchains: $AVAILABLE_TOOLCHAINS." >&5 +$as_echo "$as_me: Available toolchains: $AVAILABLE_TOOLCHAINS." >&6;} + as_fn_error $? "Cannot continue." "$LINENO" 5 + fi + TOOLCHAIN_TYPE=$with_toolchain_type + else + # No flag given, use default + TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN + fi + + TOOLCHAIN_CC_BINARY_clang="clang" + TOOLCHAIN_CC_BINARY_gcc="gcc" + TOOLCHAIN_CC_BINARY_microsoft="cl" + TOOLCHAIN_CC_BINARY_solstudio="cc" + TOOLCHAIN_CC_BINARY_xlc="xlc_r" + + TOOLCHAIN_CXX_BINARY_clang="clang++" + TOOLCHAIN_CXX_BINARY_gcc="g++" + TOOLCHAIN_CXX_BINARY_microsoft="cl" + TOOLCHAIN_CXX_BINARY_solstudio="CC" + TOOLCHAIN_CXX_BINARY_xlc="xlC_r" + + # Use indirect variable referencing + toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE + TOOLCHAIN_DESCRIPTION=${!toolchain_var_name} + toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE + TOOLCHAIN_CC_BINARY=${!toolchain_var_name} + toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE + TOOLCHAIN_CXX_BINARY=${!toolchain_var_name} - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-stile (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" - fi - fi - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" + # Define filename patterns + if test "x$OPENJDK_TARGET_OS" = xwindows; then + LIBRARY_PREFIX= + SHARED_LIBRARY_SUFFIX='.dll' + STATIC_LIBRARY_SUFFIX='.lib' + SHARED_LIBRARY='$1.dll' + STATIC_LIBRARY='$1.lib' + OBJ_SUFFIX='.obj' + EXE_SUFFIX='.exe' + else + LIBRARY_PREFIX=lib + SHARED_LIBRARY_SUFFIX='.so' + STATIC_LIBRARY_SUFFIX='.a' + SHARED_LIBRARY='lib$1.so' + STATIC_LIBRARY='lib$1.a' + OBJ_SUFFIX='.o' + EXE_SUFFIX='' + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + SHARED_LIBRARY='lib$1.dylib' + SHARED_LIBRARY_SUFFIX='.dylib' fi fi - if test "x$path" != "x$new_path"; then - JT_HOME="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} - fi - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - path="$JT_HOME" - has_colon=`$ECHO $path | $GREP ^.:` - new_path="$path" - if test "x$has_colon" = x; then - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $path` - fi - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - fi - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - if test "x$path" != "x$new_path"; then - JT_HOME="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} - fi - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5 +$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;} else - # We're on a posix platform. Hooray! :) - path="$JT_HOME" - has_space=`$ECHO "$path" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 - fi - - # Use eval to expand a potential ~ - eval path="$path" - if test ! -f "$path" && test ! -d "$path"; then - as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5 - fi - - JT_HOME="`cd "$path"; $THEPWDCMD -L`" + { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5 +$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;} fi - # jtreg win32 script works for everybody - JTREGEXE="$JT_HOME/win32/bin/jtreg" +# Then detect the actual binaries needed - if test ! -f "$JTREGEXE"; then - as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5 - fi + # FIXME: Is this needed? + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 -$as_echo "$JTREGEXE" >&6; } - else - # try to find jtreg on path + # Store the CFLAGS etc passed to the configure script. + ORG_CFLAGS="$CFLAGS" + ORG_CXXFLAGS="$CXXFLAGS" + ORG_OBJCFLAGS="$OBJCFLAGS" + # autoconf magic only relies on PATH, so update it if tools dir is specified + OLD_PATH="$PATH" - # Publish this variable in the help. + # 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 detext the visual studio installation first. + if test "x$OPENJDK_BUILD_OS" = "xwindows"; then - if test "x$JTREGEXE" = x; then - # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in jtreg -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + # Store path to cygwin link.exe to help excluding it when searching for + # VS linker. This must be done before changing the PATH when looking for VS. + # Extract the first word of "link", so it can be a program name with args. +set dummy link; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_JTREGEXE+:} false; then : +if ${ac_cv_path_CYGWIN_LINK+:} false; then : $as_echo_n "(cached) " >&6 else - case $JTREGEXE in + case $CYGWIN_LINK in [\\/]* | ?:[\\/]*) - ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. + ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -26329,7 +26376,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -26340,233 +26387,38 @@ ;; esac fi -JTREGEXE=$ac_cv_path_JTREGEXE -if test -n "$JTREGEXE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 -$as_echo "$JTREGEXE" >&6; } +CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK +if test -n "$CYGWIN_LINK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5 +$as_echo "$CYGWIN_LINK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$JTREGEXE" && break -done + if test "x$CYGWIN_LINK" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5 +$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; } + "$CYGWIN_LINK" --version > /dev/null + if test $? -eq 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # This might be the VS linker. Don't exclude it later on. + CYGWIN_LINK="" + fi + fi + + # First-hand choice is to locate and run the vsvars bat file. + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + VCVARSFILE="vc/bin/vcvars32.bat" else - # The variable is set, but is it from the command line or the environment? - - # Try to remove the string !JTREGEXE! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/} - if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then - # If it failed, the variable was not from the command line. Ignore it, - # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xJTREGEXE" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;} - fi - # Try to locate tool using the code snippet - for ac_prog in jtreg -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_JTREGEXE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $JTREGEXE in - [\\/]* | ?:[\\/]*) - ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -JTREGEXE=$ac_cv_path_JTREGEXE -if test -n "$JTREGEXE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 -$as_echo "$JTREGEXE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$JTREGEXE" && break -done - - else - # If it succeeded, then it was overridden by the user. We will use it - # for the tool. - - # First remove it from the list of overridden variables, so we can test - # for unknown variables in the end. - CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" - - # Check if the provided tool contains a complete path. - tool_specified="$JTREGEXE" - tool_basename="${tool_specified##*/}" - if test "x$tool_basename" = "x$tool_specified"; then - # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;} - # Extract the first word of "$tool_basename", so it can be a program name with args. -set dummy $tool_basename; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_JTREGEXE+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $JTREGEXE in - [\\/]* | ?:[\\/]*) - ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -JTREGEXE=$ac_cv_path_JTREGEXE -if test -n "$JTREGEXE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 -$as_echo "$JTREGEXE" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$JTREGEXE" = x; then - as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 - fi - else - # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5 -$as_echo_n "checking for JTREGEXE... " >&6; } - if test ! -x "$tool_specified"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 -$as_echo "$tool_specified" >&6; } - fi - fi - fi - - - - if test "x$JTREGEXE" = x; then - as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5 - fi - - - JT_HOME="`$DIRNAME $JTREGEXE`" - fi - fi - - - - - - if test "x$OPENJDK_TARGET_OS" = "xwindows"; then - - # Store path to cygwin link.exe to help excluding it when searching for - # VS linker. This must be done before changing the PATH when looking for VS. - # Extract the first word of "link", so it can be a program name with args. -set dummy link; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_CYGWIN_LINK+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $CYGWIN_LINK in - [\\/]* | ?:[\\/]*) - ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK -if test -n "$CYGWIN_LINK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5 -$as_echo "$CYGWIN_LINK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$CYGWIN_LINK" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5 -$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; } - "$CYGWIN_LINK" --version > /dev/null - if test $? -eq 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - # This might be the VS linker. Don't exclude it later on. - CYGWIN_LINK="" - fi - fi - - # First-hand choice is to locate and run the vsvars bat file. - - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - VCVARSFILE="vc/bin/vcvars32.bat" - else - VCVARSFILE="vc/bin/amd64/vcvars64.bat" - fi + VCVARSFILE="vc/bin/amd64/vcvars64.bat" + fi VS_ENV_CMD="" VS_ENV_ARGS="" @@ -27173,8 +27025,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -27310,493 +27160,199 @@ as_fn_error $? "Cannot continue" "$LINENO" 5 fi + 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 + PATH=$TOOLS_DIR:$PATH + fi -# Check whether --with-msvcr-dll was given. -if test "${with_msvcr_dll+set}" = set; then : - withval=$with_msvcr_dll; -fi - - - if test "x$with_msvcr_dll" != x; then - # If given explicitely by user, do not probe. If not present, fail directly. + # If a devkit is found on the builddeps server, then prepend its path to the + # PATH variable. If there are cross compilers available in the devkit, these + # will be found by AC_PROG_CC et al. + DEVKIT= - POSSIBLE_MSVCR_DLL="$with_msvcr_dll" - METHOD="--with-msvcr-dll" - if test -e "$POSSIBLE_MSVCR_DLL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 -$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} - # Need to check if the found msvcr is correct architecture - { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 -$as_echo_n "checking found msvcr100.dll architecture... " >&6; } - MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - CORRECT_MSVCR_ARCH=386 - else - CORRECT_MSVCR_ARCH=x86-64 + if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then + # Source the builddeps file again, to make sure it uses the latest variables! + . $builddepsfile + # Look for a target and build machine specific resource! + eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} + if test "x$resource" = x; then + # Ok, lets instead look for a target specific resource + eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}} fi - if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 -$as_echo "$MSVCR_DLL" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 -$as_echo "incorrect, ignoring" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 -$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + if test "x$resource" = x; then + # Ok, lets instead look for a build specific resource + eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}} fi - fi - - if test "x$MSVCR_DLL" = x; then - as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5 + if test "x$resource" = x; then + # Ok, lets instead look for a generic resource + # (The devkit comes from M4 and not the shell, thus no need for eval here.) + resource=${builddep_devkit} fi - fi - - if test "x$MSVCR_DLL" = x; then - # Probe: Using well-known location from Visual Studio 10.0 - if test "x$VCINSTALLDIR" != x; then - CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR" - - windows_path="$CYGWIN_VC_INSTALL_DIR" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - CYGWIN_VC_INSTALL_DIR="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - CYGWIN_VC_INSTALL_DIR="$unix_path" - fi - - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll" + if test "x$resource" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5 +$as_echo "$as_me: Using builddeps $resource for devkit" >&6;} + # If the resource in the builddeps.conf file is an existing directory, + # for example /java/linux/cups + if test -d ${resource}; then + depdir=${resource} else - POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll" - fi - - POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - METHOD="well-known location in VCINSTALLDIR" - if test -e "$POSSIBLE_MSVCR_DLL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 -$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} - # Need to check if the found msvcr is correct architecture - { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 -$as_echo_n "checking found msvcr100.dll architecture... " >&6; } - MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - CORRECT_MSVCR_ARCH=386 - else - CORRECT_MSVCR_ARCH=x86-64 + # devkit is for example mymodule + # $resource is for example libs/general/libmymod_1_2_3.zip + # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps + # $with_builddeps_dir is for example /localhome/builddeps + # depdir is the name of the variable into which we store the depdir, eg MYMOD + # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and + # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 + filename=`basename $resource` + filebase=`echo $filename | sed 's/\.[^\.]*$//'` + filebase=${filename%%.*} + extension=${filename#*.} + installdir=$with_builddeps_dir/$filebase + if test ! -f $installdir/$filename.unpacked; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5 +$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;} + if test ! -d $installdir; then + mkdir -p $installdir fi - if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 -$as_echo "$MSVCR_DLL" >&6; } + if test ! -d $installdir; then + as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 + fi + tmpfile=`mktemp $installdir/devkit.XXXXXXXXX` + touch $tmpfile + if test ! -f $tmpfile; then + as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 + fi + + # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip + # $tmpfile is the local file name for the downloaded file. + VALID_TOOL=no + if test "x$BDEPS_FTP" = xwget; then + VALID_TOOL=yes + wget -O $tmpfile $with_builddeps_server/$resource + fi + if test "x$BDEPS_FTP" = xlftp; then + VALID_TOOL=yes + lftp -c "get $with_builddeps_server/$resource -o $tmpfile" + fi + if test "x$BDEPS_FTP" = xftp; then + VALID_TOOL=yes + FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` + FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` + FTPUSERPWD=${FTPSERVER%%@*} + if test "x$FTPSERVER" != "x$FTPUSERPWD"; then + FTPUSER=${userpwd%%:*} + FTPPWD=${userpwd#*@} + FTPSERVER=${FTPSERVER#*@} else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 -$as_echo "incorrect, ignoring" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 -$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + FTPUSER=ftp + FTPPWD=ftp fi + # the "pass" command does not work on some + # ftp clients (read ftp.exe) but if it works, + # passive mode is better! + ( \ + echo "user $FTPUSER $FTPPWD" ; \ + echo "pass" ; \ + echo "bin" ; \ + echo "get $FTPPATH $tmpfile" ; \ + ) | ftp -in $FTPSERVER + fi + if test "x$VALID_TOOL" != xyes; then + as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 fi + mv $tmpfile $installdir/$filename + if test ! -s $installdir/$filename; then + as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 fi + case "$extension" in + zip) echo "Unzipping $installdir/$filename..." + (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) + ;; + tar.gz) echo "Untaring $installdir/$filename..." + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) + ;; + tgz) echo "Untaring $installdir/$filename..." + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) + ;; + *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 + ;; + esac + fi + if test -f $installdir/$filename.unpacked; then + depdir=$installdir fi - if test "x$MSVCR_DLL" = x; then - # Probe: Check in the Boot JDK directory. - POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll" + fi + # Source the builddeps file again, because in the previous command, the depdir + # was updated to point at the current build dependency install directory. + . $builddepsfile + # Now extract variables from the builddeps.conf files. + theroot=${builddep_devkit_ROOT} + thecflags=${builddep_devkit_CFLAGS} + thelibs=${builddep_devkit_LIBS} + if test "x$depdir" = x; then + as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5 + fi + DEVKIT=$depdir + if test "x$theroot" != x; then + DEVKIT="$theroot" + fi + if test "x$thecflags" != x; then + DEVKIT_CFLAGS="$thecflags" + fi + if test "x$thelibs" != x; then + DEVKIT_LIBS="$thelibs" + fi + + # Found devkit + PATH="$DEVKIT/bin:$PATH" + SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" + if test "x$x_includes" = "xNONE"; then + x_includes="$SYS_ROOT/usr/include/X11" + fi + if test "x$x_libraries" = "xNONE"; then + x_libraries="$SYS_ROOT/usr/lib" + fi - POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - METHOD="well-known location in Boot JDK" - if test -e "$POSSIBLE_MSVCR_DLL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 -$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} - # Need to check if the found msvcr is correct architecture - { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 -$as_echo_n "checking found msvcr100.dll architecture... " >&6; } - MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - CORRECT_MSVCR_ARCH=386 - else - CORRECT_MSVCR_ARCH=x86-64 - fi - if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 -$as_echo "$MSVCR_DLL" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 -$as_echo "incorrect, ignoring" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 -$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} fi - fi fi - if test "x$MSVCR_DLL" = x; then - # Probe: Look in the Windows system32 directory - CYGWIN_SYSTEMROOT="$SYSTEMROOT" - - windows_path="$CYGWIN_SYSTEMROOT" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - CYGWIN_SYSTEMROOT="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - CYGWIN_SYSTEMROOT="$unix_path" - fi - POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll" - POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - METHOD="well-known location in SYSTEMROOT" - if test -e "$POSSIBLE_MSVCR_DLL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 -$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + # + # Setup the compilers (CC and CXX) + # - # Need to check if the found msvcr is correct architecture - { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 -$as_echo_n "checking found msvcr100.dll architecture... " >&6; } - MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - CORRECT_MSVCR_ARCH=386 - else - CORRECT_MSVCR_ARCH=x86-64 - fi - if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 -$as_echo "$MSVCR_DLL" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 -$as_echo "incorrect, ignoring" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 -$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} - fi - fi + COMPILER_NAME=C + SEARCH_LIST="$TOOLCHAIN_CC_BINARY" - fi + if test "x$CC" != x; then + # User has supplied compiler name already, always let that override. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5 +$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;} + if test "x`basename $CC`" = "x$CC"; then + # A command without a complete path is provided, search $PATH. - if test "x$MSVCR_DLL" = x; then - # Probe: If Visual Studio Express is installed, there is usually one with the debugger - if test "x$VS100COMNTOOLS" != x; then - CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.." - - windows_path="$CYGWIN_VS_TOOLS_DIR" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - CYGWIN_VS_TOOLS_DIR="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - CYGWIN_VS_TOOLS_DIR="$unix_path" - fi - - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1` - else - POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1` - fi - - POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - METHOD="search of VS100COMNTOOLS" - if test -e "$POSSIBLE_MSVCR_DLL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 -$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} - - # Need to check if the found msvcr is correct architecture - { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 -$as_echo_n "checking found msvcr100.dll architecture... " >&6; } - MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - CORRECT_MSVCR_ARCH=386 - else - CORRECT_MSVCR_ARCH=x86-64 - fi - if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 -$as_echo "$MSVCR_DLL" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 -$as_echo "incorrect, ignoring" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 -$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} - fi - fi - - fi - fi - - if test "x$MSVCR_DLL" = x; then - # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now. - # (This was the original behaviour; kept since it might turn up something) - if test "x$CYGWIN_VC_INSTALL_DIR" != x; then - if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then - POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1` - else - POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1` - if test "x$POSSIBLE_MSVCR_DLL" = x; then - # We're grasping at straws now... - POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1` - fi - fi - - - POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - METHOD="search of VCINSTALLDIR" - if test -e "$POSSIBLE_MSVCR_DLL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 -$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} - - # Need to check if the found msvcr is correct architecture - { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 -$as_echo_n "checking found msvcr100.dll architecture... " >&6; } - MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` - if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then - CORRECT_MSVCR_ARCH=386 - else - CORRECT_MSVCR_ARCH=x86-64 - fi - if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - MSVCR_DLL="$POSSIBLE_MSVCR_DLL" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 -$as_echo "$MSVCR_DLL" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 -$as_echo "incorrect, ignoring" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 -$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} - fi - fi - - fi - fi - - if test "x$MSVCR_DLL" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 -$as_echo_n "checking for msvcr100.dll... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5 - fi - - - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # Input might be given as Windows format, start by converting to - # unix format. - path="$MSVCR_DLL" - new_path=`$CYGPATH -u "$path"` - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file precense. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5 - fi - - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. - - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-stile (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" - fi - fi - - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" - fi - fi - - - if test "x$path" != "x$new_path"; then - MSVCR_DLL="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} - fi - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - path="$MSVCR_DLL" - has_colon=`$ECHO $path | $GREP ^.:` - new_path="$path" - if test "x$has_colon" = x; then - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $path` - fi - - - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - fi - - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - if test "x$path" != "x$new_path"; then - MSVCR_DLL="$new_path" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 -$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} - fi - - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") - - else - # We're on a posix platform. Hooray! :) - path="$MSVCR_DLL" - has_space=`$ECHO "$path" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 -$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 - fi - - # Use eval to expand a potential ~ - eval path="$path" - if test ! -f "$path" && test ! -d "$path"; then - as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 - fi - - MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`" - fi - - - - -# Check whether --with-dxsdk was given. -if test "${with_dxsdk+set}" = set; then : - withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5 -$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;} -fi - - - - -# Check whether --with-dxsdk-lib was given. -if test "${with_dxsdk_lib+set}" = set; then : - withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5 -$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;} -fi - - - - -# Check whether --with-dxsdk-include was given. -if test "${with_dxsdk_include+set}" = set; then : - withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5 -$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;} -fi - - - fi - - - - # If --build AND --host is set, then the configure script will find any - # cross compilation tools in the PATH. Cross compilation tools - # follows the cross compilation standard where they are prefixed with ${host}. - # For example the binary i686-sun-solaris2.10-gcc - # will cross compile for i686-sun-solaris2.10 - # If neither of build and host is not set, then build=host and the - # default compiler found in the path will be used. - # Setting only --host, does not seem to be really supported. - # Please set both --build and --host if you want to cross compile. - - if test "x$COMPILE_TYPE" = "xcross"; then - # Now we to find a C/C++ compiler that can build executables for the build - # platform. We can't use the AC_PROG_CC macro, since it can only be used - # once. Also, we need to do this before adding a tools dir to the path, - # otherwise we might pick up cross-compilers which don't use standard naming. - # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have - # to wait until they are properly discovered. - - - # Publish this variable in the help. - - - if test "x$BUILD_CC" = x; then - # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in cl cc gcc + for ac_prog in $CC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_CC+:} false; then : +if ${ac_cv_path_POTENTIAL_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_CC in + case $POTENTIAL_CC in [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. + ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -27806,7 +27362,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -27817,44 +27373,60 @@ ;; esac fi -BUILD_CC=$ac_cv_path_BUILD_CC -if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } +POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC +if test -n "$POTENTIAL_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 +$as_echo "$POTENTIAL_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$BUILD_CC" && break + test -n "$POTENTIAL_CC" && break done + if test "x$POTENTIAL_CC" != x; then + CC=$POTENTIAL_CC + else + as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5 + fi + else + # Otherwise it might already be a complete path + if test ! -x "$CC"; then + as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5 + fi + fi else - # The variable is set, but is it from the command line or the environment? + # No user supplied value. Locate compiler ourselves. - # Try to remove the string !BUILD_CC! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/} - if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then - # If it failed, the variable was not from the command line. Ignore it, - # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xBUILD_CC" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;} - fi - # Try to locate tool using the code snippet - for ac_prog in cl cc gcc + # If we are cross compiling, assume cross compilation tools follows the + # cross compilation standard where they are prefixed with the autoconf + # standard name for the target. For example the binary + # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10. + # If we are not cross compiling, then the default compiler name will be + # used. + + CC= + # If TOOLS_DIR is set, check for all compiler names in there first + # before checking the rest of the PATH. + # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION + # step, this should not be necessary. + if test -n "$TOOLS_DIR"; then + PATH_save="$PATH" + PATH="$TOOLS_DIR" + for ac_prog in $SEARCH_LIST do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_CC+:} false; then : +if ${ac_cv_path_TOOLS_DIR_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_CC in + case $TOOLS_DIR_CC in [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. + ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -27864,7 +27436,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -27875,44 +27447,38 @@ ;; esac fi -BUILD_CC=$ac_cv_path_BUILD_CC -if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } +TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC +if test -n "$TOOLS_DIR_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5 +$as_echo "$TOOLS_DIR_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$BUILD_CC" && break + test -n "$TOOLS_DIR_CC" && break done - else - # If it succeeded, then it was overridden by the user. We will use it - # for the tool. - - # First remove it from the list of overridden variables, so we can test - # for unknown variables in the end. - CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + CC=$TOOLS_DIR_CC + PATH="$PATH_save" + fi - # Check if the provided tool contains a complete path. - tool_specified="$BUILD_CC" - tool_basename="${tool_specified##*/}" - if test "x$tool_basename" = "x$tool_specified"; then - # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;} - # Extract the first word of "$tool_basename", so it can be a program name with args. -set dummy $tool_basename; ac_word=$2 + # AC_PATH_PROGS can't be run multiple times with the same variable, + # so create a new name for this run. + if test "x$CC" = x; then + for ac_prog in $SEARCH_LIST +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_CC+:} false; then : +if ${ac_cv_path_POTENTIAL_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_CC in + case $POTENTIAL_CC in [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. + ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -27922,7 +27488,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -27933,43 +27499,64 @@ ;; esac fi -BUILD_CC=$ac_cv_path_BUILD_CC -if test -n "$BUILD_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 -$as_echo "$BUILD_CC" >&6; } +POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC +if test -n "$POTENTIAL_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 +$as_echo "$POTENTIAL_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$BUILD_CC" = x; then - as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 - fi - else - # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5 -$as_echo_n "checking for BUILD_CC... " >&6; } - if test ! -x "$tool_specified"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 -$as_echo "$tool_specified" >&6; } - fi + test -n "$POTENTIAL_CC" && break +done + + CC=$POTENTIAL_CC + fi + + if test "x$CC" = x; then + + # Print a helpful message on how to acquire the necessary build dependency. + # devkit is the help tag: freetype, cups, pulse, alsa etc + MISSING_DEPENDENCY=devkit + + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + cygwin_help $MISSING_DEPENDENCY + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + msys_help $MISSING_DEPENDENCY + else + PKGHANDLER_COMMAND= + + case $PKGHANDLER in + apt-get) + apt_help $MISSING_DEPENDENCY ;; + yum) + yum_help $MISSING_DEPENDENCY ;; + port) + port_help $MISSING_DEPENDENCY ;; + pkgutil) + pkgutil_help $MISSING_DEPENDENCY ;; + pkgadd) + pkgadd_help $MISSING_DEPENDENCY ;; + esac + + if test "x$PKGHANDLER_COMMAND" != x; then + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." fi fi + as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 + fi + fi + # Now we have a compiler binary in CC. Make sure it's okay. if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$BUILD_CC" + complete="$CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -28005,14 +27592,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 fi fi @@ -28032,11 +27619,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -28083,7 +27670,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$BUILD_CC" + complete="$CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -28128,14 +27715,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 fi fi @@ -28181,7 +27768,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$BUILD_CC" + complete="$CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -28200,20 +27787,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 fi fi @@ -28225,98 +27810,107 @@ fi if test "x$complete" != "x$new_complete"; then - BUILD_CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} + CC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} fi + TEST_COMPILER="$CC" + # 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. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 +$as_echo_n "checking resolved symbolic links for CC... " >&6; } + if test "x$OPENJDK_BUILD_OS" != xwindows; then + # Follow a chain of symbolic links. Use readlink + # where it exists, else fall back to horribly + # complicated shell code. + if test "x$READLINK_TESTED" != yes; then + # On MacOSX there is a readlink tool with a different + # purpose than the GNU readlink tool. Check the found readlink. + ISGNU=`$READLINK --version 2>&1 | $GREP GNU` + if test "x$ISGNU" = x; then + # A readlink that we do not know how to use. + # Are there other non-GNU readlinks out there? + READLINK_TESTED=yes + READLINK= + fi + fi - # Publish this variable in the help. - - - if test "x$BUILD_CXX" = x; then - # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in cl CC g++ -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $BUILD_CXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + if test "x$READLINK" != x; then + TEST_COMPILER=`$READLINK -f $TEST_COMPILER` + else + # Save the current directory for restoring afterwards + STARTDIR=$PWD + COUNTER=0 + sym_link_dir=`$DIRNAME $TEST_COMPILER` + sym_link_file=`$BASENAME $TEST_COMPILER` + cd $sym_link_dir + # Use -P flag to resolve symlinks in directories. + cd `$THEPWDCMD -P` + sym_link_dir=`$THEPWDCMD -P` + # Resolve file symlinks + while test $COUNTER -lt 20; do + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` + if test "x$ISLINK" == x; then + # This is not a symbolic link! We are done! + break + fi + # Again resolve directory symlinks since the target of the just found + # link could be in a different directory + cd `$DIRNAME $ISLINK` + sym_link_dir=`$THEPWDCMD -P` + sym_link_file=`$BASENAME $ISLINK` + let COUNTER=COUNTER+1 + done + cd $STARTDIR + TEST_COMPILER=$sym_link_dir/$sym_link_file + fi fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -BUILD_CXX=$ac_cv_path_BUILD_CXX -if test -n "$BUILD_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 -$as_echo "$BUILD_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 +$as_echo "$TEST_COMPILER" >&6; } + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 +$as_echo_n "checking if CC is disguised ccache... " >&6; } - test -n "$BUILD_CXX" && break -done + COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` + if test "x$COMPILER_BASENAME" = "xccache"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 +$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } + # 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. - else - # The variable is set, but is it from the command line or the environment? + # Remove the path to the fake ccache cc from the PATH + RETRY_COMPILER_SAVED_PATH="$PATH" + COMPILER_DIRNAME=`$DIRNAME $CC` + PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" - # Try to remove the string !BUILD_CXX! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/} - if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then - # If it failed, the variable was not from the command line. Ignore it, - # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xBUILD_CXX" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;} - fi - # Try to locate tool using the code snippet - for ac_prog in cl CC g++ -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + # Try again looking for our compiler + if test -n "$ac_tool_prefix"; then + for ac_prog in $TOOLCHAIN_CC_BINARY + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_CXX+:} false; then : +if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_CXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$PROPER_COMPILER_CC"; then + ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -28324,57 +27918,43 @@ done IFS=$as_save_IFS - ;; -esac fi -BUILD_CXX=$ac_cv_path_BUILD_CXX -if test -n "$BUILD_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 -$as_echo "$BUILD_CXX" >&6; } +fi +PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC +if test -n "$PROPER_COMPILER_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 +$as_echo "$PROPER_COMPILER_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$BUILD_CXX" && break -done - - else - # If it succeeded, then it was overridden by the user. We will use it - # for the tool. - - # First remove it from the list of overridden variables, so we can test - # for unknown variables in the end. - CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" - - # Check if the provided tool contains a complete path. - tool_specified="$BUILD_CXX" - tool_basename="${tool_specified##*/}" - if test "x$tool_basename" = "x$tool_specified"; then - # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;} - # Extract the first word of "$tool_basename", so it can be a program name with args. -set dummy $tool_basename; ac_word=$2 + test -n "$PROPER_COMPILER_CC" && break + done +fi +if test -z "$PROPER_COMPILER_CC"; then + ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC + for ac_prog in $TOOLCHAIN_CC_BINARY +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_CXX+:} false; then : +if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_CXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_PROPER_COMPILER_CC"; then + ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -28382,46 +27962,40 @@ done IFS=$as_save_IFS - ;; -esac fi -BUILD_CXX=$ac_cv_path_BUILD_CXX -if test -n "$BUILD_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 -$as_echo "$BUILD_CXX" >&6; } +fi +ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC +if test -n "$ac_ct_PROPER_COMPILER_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 +$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$BUILD_CXX" = x; then - as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 - fi - else - # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5 -$as_echo_n "checking for BUILD_CXX... " >&6; } - if test ! -x "$tool_specified"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 -$as_echo "$tool_specified" >&6; } - fi - fi - fi + test -n "$ac_ct_PROPER_COMPILER_CC" && break +done + if test "x$ac_ct_PROPER_COMPILER_CC" = x; then + PROPER_COMPILER_CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC + fi +fi if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$BUILD_CXX" + complete="$PROPER_COMPILER_CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -28457,14 +28031,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 fi fi @@ -28484,11 +28058,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -28535,7 +28109,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$BUILD_CXX" + complete="$PROPER_COMPILER_CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -28580,14 +28154,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 fi fi @@ -28633,7 +28207,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$BUILD_CXX" + complete="$PROPER_COMPILER_CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -28652,20 +28226,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 fi fi @@ -28677,40 +28249,213 @@ fi if test "x$complete" != "x$new_complete"; then - BUILD_CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} + PROPER_COMPILER_CC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} fi + PATH="$RETRY_COMPILER_SAVED_PATH" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 +$as_echo_n "checking for resolved symbolic links for CC... " >&6; } - # Publish this variable in the help. + if test "x$OPENJDK_BUILD_OS" != xwindows; then + # Follow a chain of symbolic links. Use readlink + # where it exists, else fall back to horribly + # complicated shell code. + if test "x$READLINK_TESTED" != yes; then + # On MacOSX there is a readlink tool with a different + # purpose than the GNU readlink tool. Check the found readlink. + ISGNU=`$READLINK --version 2>&1 | $GREP GNU` + if test "x$ISGNU" = x; then + # A readlink that we do not know how to use. + # Are there other non-GNU readlinks out there? + READLINK_TESTED=yes + READLINK= + fi + fi + + if test "x$READLINK" != x; then + PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` + else + # Save the current directory for restoring afterwards + STARTDIR=$PWD + COUNTER=0 + sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` + sym_link_file=`$BASENAME $PROPER_COMPILER_CC` + cd $sym_link_dir + # Use -P flag to resolve symlinks in directories. + cd `$THEPWDCMD -P` + sym_link_dir=`$THEPWDCMD -P` + # Resolve file symlinks + while test $COUNTER -lt 20; do + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` + if test "x$ISLINK" == x; then + # This is not a symbolic link! We are done! + break + fi + # Again resolve directory symlinks since the target of the just found + # link could be in a different directory + cd `$DIRNAME $ISLINK` + sym_link_dir=`$THEPWDCMD -P` + sym_link_file=`$BASENAME $ISLINK` + let COUNTER=COUNTER+1 + done + cd $STARTDIR + PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 +$as_echo "$PROPER_COMPILER_CC" >&6; } + CC="$PROPER_COMPILER_CC" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 +$as_echo "no, keeping CC" >&6; } + fi - if test "x$BUILD_LD" = x; then - # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in ld -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + + COMPILER=$CC + COMPILER_NAME=$COMPILER_NAME + + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then + # cc -V output typically looks like + # cc: Sun C 5.12 Linux_i386 2011/11/16 + COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1` + # Check that this is likely to be the Solaris Studio cc. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null + if test $? -ne 0; then + ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1` + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Remove usage instructions (if present), and + # collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/ *Uusage:.*//'` + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"` + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + # xlc -qversion output typically looks like + # IBM XL C/C++ for AIX, V11.1 (5724-X13) + # Version: 11.01.0000.0015 + COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1` + # Check that this is likely to be the IBM XL C compiler. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null + if test $? -ne 0; then + ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1` + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # There is no specific version flag, but all output starts with a version string. + # First line typically looks something like: + # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 + COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` + # Check that this is likely to be Microsoft CL.EXE. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xgcc; then + # gcc --version output typically looks like + # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 + # Copyright (C) 2013 Free Software Foundation, Inc. + # This is free software; see the source for copying conditions. There is NO + # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1` + # Check that this is likely to be GCC. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Remove Copyright and legalese from version string, and + # collapse into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/ *Copyright .*//'` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xclang; then + # clang --version output typically looks like + # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) + # clang version 3.3 (tags/RELEASE_33/final) + # or + # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2) + # Target: x86_64-pc-linux-gnu + # Thread model: posix + COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1` + # Check that this is likely to be clang + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'` + else + as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5 + fi + # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker) + CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER" + # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker) + CC_VERSION_STRING="$COMPILER_VERSION_STRING" + + { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5 +$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;} + + + # Now that we have resolved CC ourself, let autoconf have its go at it + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_LD+:} false; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_LD in - [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -28718,57 +28463,43 @@ done IFS=$as_save_IFS - ;; -esac fi -BUILD_LD=$ac_cv_path_BUILD_LD -if test -n "$BUILD_LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 -$as_echo "$BUILD_LD" >&6; } +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$BUILD_LD" && break -done - - else - # The variable is set, but is it from the command line or the environment? - - # Try to remove the string !BUILD_LD! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/} - if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then - # If it failed, the variable was not from the command line. Ignore it, - # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xBUILD_LD" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;} - fi - # Try to locate tool using the code snippet - for ac_prog in ld + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in $CC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_LD+:} false; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $BUILD_LD in - [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -28776,579 +28507,550 @@ done IFS=$as_save_IFS - ;; -esac fi -BUILD_LD=$ac_cv_path_BUILD_LD -if test -n "$BUILD_LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 -$as_echo "$BUILD_LD" >&6; } +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$BUILD_LD" && break + test -n "$ac_ct_CC" && break done - else - # If it succeeded, then it was overridden by the user. We will use it - # for the tool. + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi - # First remove it from the list of overridden variables, so we can test - # for unknown variables in the end. - CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" - # Check if the provided tool contains a complete path. - tool_specified="$BUILD_LD" - tool_basename="${tool_specified##*/}" - if test "x$tool_basename" = "x$tool_specified"; then - # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;} - # Extract the first word of "$tool_basename", so it can be a program name with args. -set dummy $tool_basename; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_BUILD_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $BUILD_LD in - [\\/]* | ?:[\\/]*) - ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } done - done -IFS=$as_save_IFS - ;; -esac -fi -BUILD_LD=$ac_cv_path_BUILD_LD -if test -n "$BUILD_LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 -$as_echo "$BUILD_LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ - if test "x$BUILD_LD" = x; then - as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 - fi - else - # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5 -$as_echo_n "checking for BUILD_LD... " >&6; } - if test ! -x "$tool_specified"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 -$as_echo "$tool_specified" >&6; } - fi - fi - fi - - - - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$BUILD_LD" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path=`$CYGPATH -u "$path"` - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path=`$CYGPATH -u "$path"` - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 - fi - fi - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file presence. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - # Short path failed, file does not exist as specified. - # Try adding .exe or .cmd - if test -f "${new_path}.exe"; then - input_to_shortpath="${new_path}.exe" - elif test -f "${new_path}.cmd"; then - input_to_shortpath="${new_path}.cmd" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 -$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 - fi - else - input_to_shortpath="$new_path" - fi - - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. - new_path="$input_to_shortpath" - - input_path="$input_to_shortpath" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-stile (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" - fi - fi - - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" - fi - fi - - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$BUILD_LD" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - - new_path=`$WHICH "$new_path" 2> /dev/null` + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 - fi - fi +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - # Now new_path has a complete unix path to the binary - if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then - # Keep paths in /bin as-is, but remove trailing .exe if any - new_path="${new_path/%.exe/}" - # Do not save /bin paths to all_fixpath_prefixes! - else - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $new_path` +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - fi +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= - # Output is in $new_path +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext - # remove trailing .exe if any - new_path="${new_path/%.exe/}" +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") - fi +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no else - # We're on a posix platform. Hooray! :) - # First separate the path from the arguments. This will split at the first - # space. - complete="$BUILD_LD" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Cannot rely on the command "which" here since it doesn't always work. - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test -z "$is_absolute_path"; then - # Path to executable is not absolute. Find it. - IFS_save="$IFS" - IFS=: - for p in $PATH; do - if test -f "$p/$path" && test -x "$p/$path"; then - new_path="$p/$path" - break - fi - done - IFS="$IFS_save" + if test "$cross_compiling" = maybe; then + cross_compiling=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;} - new_path="$path" - fi - - if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 -$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } fi fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi - - if test "x$complete" != "x$new_complete"; then - BUILD_LD="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} - fi - - fi - - +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ - # If a devkit is found on the builddeps server, then prepend its path to the - # PATH variable. If there are cross compilers available in the devkit, these - # will be found by AC_PROG_CC et al. - DEVKIT= + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then - # Source the builddeps file again, to make sure it uses the latest variables! - . $builddepsfile - # Look for a target and build machine specific resource! - eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} - if test "x$resource" = x; then - # Ok, lets instead look for a target specific resource - eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}} - fi - if test "x$resource" = x; then - # Ok, lets instead look for a build specific resource - eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}} - fi - if test "x$resource" = x; then - # Ok, lets instead look for a generic resource - # (The devkit comes from M4 and not the shell, thus no need for eval here.) - resource=${builddep_devkit} - fi - if test "x$resource" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5 -$as_echo "$as_me: Using builddeps $resource for devkit" >&6;} - # If the resource in the builddeps.conf file is an existing directory, - # for example /java/linux/cups - if test -d ${resource}; then - depdir=${resource} - else +int +main () +{ +#ifndef __GNUC__ + choke me +#endif - # devkit is for example mymodule - # $resource is for example libs/general/libmymod_1_2_3.zip - # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps - # $with_builddeps_dir is for example /localhome/builddeps - # depdir is the name of the variable into which we store the depdir, eg MYMOD - # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and - # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 - filename=`basename $resource` - filebase=`echo $filename | sed 's/\.[^\.]*$//'` - filebase=${filename%%.*} - extension=${filename#*.} - installdir=$with_builddeps_dir/$filebase - if test ! -f $installdir/$filename.unpacked; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5 -$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;} - if test ! -d $installdir; then - mkdir -p $installdir - fi - if test ! -d $installdir; then - as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 - fi - tmpfile=`mktemp $installdir/devkit.XXXXXXXXX` - touch $tmpfile - if test ! -f $tmpfile; then - as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu - # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip - # $tmpfile is the local file name for the downloaded file. - VALID_TOOL=no - if test "x$BDEPS_FTP" = xwget; then - VALID_TOOL=yes - wget -O $tmpfile $with_builddeps_server/$resource - fi - if test "x$BDEPS_FTP" = xlftp; then - VALID_TOOL=yes - lftp -c "get $with_builddeps_server/$resource -o $tmpfile" - fi - if test "x$BDEPS_FTP" = xftp; then - VALID_TOOL=yes - FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` - FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` - FTPUSERPWD=${FTPSERVER%%@*} - if test "x$FTPSERVER" != "x$FTPUSERPWD"; then - FTPUSER=${userpwd%%:*} - FTPPWD=${userpwd#*@} - FTPSERVER=${FTPSERVER#*@} - else - FTPUSER=ftp - FTPPWD=ftp - fi - # the "pass" command does not work on some - # ftp clients (read ftp.exe) but if it works, - # passive mode is better! - ( \ - echo "user $FTPUSER $FTPPWD" ; \ - echo "pass" ; \ - echo "bin" ; \ - echo "get $FTPPATH $tmpfile" ; \ - ) | ftp -in $FTPSERVER - fi - if test "x$VALID_TOOL" != xyes; then - as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - mv $tmpfile $installdir/$filename - if test ! -s $installdir/$filename; then - as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 - fi - case "$extension" in - zip) echo "Unzipping $installdir/$filename..." - (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) - ;; - tar.gz) echo "Untaring $installdir/$filename..." - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) - ;; - tgz) echo "Untaring $installdir/$filename..." - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) - ;; - *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 - ;; - esac - fi - if test -f $installdir/$filename.unpacked; then - depdir=$installdir - fi +int +main () +{ - fi - # Source the builddeps file again, because in the previous command, the depdir - # was updated to point at the current build dependency install directory. - . $builddepsfile - # Now extract variables from the builddeps.conf files. - theroot=${builddep_devkit_ROOT} - thecflags=${builddep_devkit_CFLAGS} - thelibs=${builddep_devkit_LIBS} - if test "x$depdir" = x; then - as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5 - fi - DEVKIT=$depdir - if test "x$theroot" != x; then - DEVKIT="$theroot" - fi - if test "x$thecflags" != x; then - DEVKIT_CFLAGS="$thecflags" - fi - if test "x$thelibs" != x; then - DEVKIT_LIBS="$thelibs" - fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - # Found devkit - PATH="$DEVKIT/bin:$PATH" - SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" - if test "x$x_includes" = "xNONE"; then - x_includes="$SYS_ROOT/usr/include/X11" - fi - if test "x$x_libraries" = "xNONE"; then - x_libraries="$SYS_ROOT/usr/lib" - fi +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - fi +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - # Store the CFLAGS etal passed to the configure script. - ORG_CFLAGS="$CFLAGS" - ORG_CXXFLAGS="$CXXFLAGS" - ORG_OBJCFLAGS="$OBJCFLAGS" +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - # autoconf magic only relies on PATH, so update it if tools dir is specified - OLD_PATH="$PATH" - if test "x$TOOLS_DIR" != x; then - PATH=$TOOLS_DIR:$PATH - fi +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : - ### Locate C compiler (CC) +fi - # On windows, only cl.exe is supported. - # On Solaris, cc is preferred to gcc. - # Elsewhere, gcc is preferred to cc. +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - if test "x$OPENJDK_TARGET_OS" = "xwindows"; then - COMPILER_CHECK_LIST="cl" - elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then - COMPILER_CHECK_LIST="cc gcc" - elif test "x$OPENJDK_TARGET_OS" = "xaix"; then - # Do not probe for cc on AIX. - COMPILER_CHECK_LIST="xlc_r" - else - COMPILER_CHECK_LIST="gcc cc" - fi - COMPILER_NAME=C - SEARCH_LIST="$COMPILER_CHECK_LIST" + COMPILER_NAME=C++ + SEARCH_LIST="$TOOLCHAIN_CXX_BINARY" - if test "x$CC" != x; then + if test "x$CXX" != x; then # User has supplied compiler name already, always let that override. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5 -$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;} - if test "x`basename $CC`" = "x$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5 +$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;} + if test "x`basename $CXX`" = "x$CXX"; then # A command without a complete path is provided, search $PATH. - for ac_prog in $CC + for ac_prog in $CXX do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_POTENTIAL_CC+:} false; then : +if ${ac_cv_path_POTENTIAL_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - case $POTENTIAL_CC in + case $POTENTIAL_CXX in [\\/]* | ?:[\\/]*) - ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. + ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -29358,7 +29060,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -29369,35 +29071,45 @@ ;; esac fi -POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC -if test -n "$POTENTIAL_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 -$as_echo "$POTENTIAL_CC" >&6; } +POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX +if test -n "$POTENTIAL_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 +$as_echo "$POTENTIAL_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$POTENTIAL_CC" && break + test -n "$POTENTIAL_CXX" && break done - if test "x$POTENTIAL_CC" != x; then - CC=$POTENTIAL_CC + if test "x$POTENTIAL_CXX" != x; then + CXX=$POTENTIAL_CXX else - as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5 + as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5 fi else # Otherwise it might already be a complete path - if test ! -x "$CC"; then - as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5 + if test ! -x "$CXX"; then + as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5 fi fi else - # No user supplied value. Locate compiler ourselves - CC= + # No user supplied value. Locate compiler ourselves. + + # If we are cross compiling, assume cross compilation tools follows the + # cross compilation standard where they are prefixed with the autoconf + # standard name for the target. For example the binary + # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10. + # If we are not cross compiling, then the default compiler name will be + # used. + + CXX= # If TOOLS_DIR is set, check for all compiler names in there first # before checking the rest of the PATH. + # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION + # step, this should not be necessary. if test -n "$TOOLS_DIR"; then PATH_save="$PATH" PATH="$TOOLS_DIR" @@ -29407,12 +29119,12 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TOOLS_DIR_CC+:} false; then : +if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - case $TOOLS_DIR_CC in + case $TOOLS_DIR_CXX in [\\/]* | ?:[\\/]*) - ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path. + ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -29422,7 +29134,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -29433,38 +29145,38 @@ ;; esac fi -TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC -if test -n "$TOOLS_DIR_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5 -$as_echo "$TOOLS_DIR_CC" >&6; } +TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX +if test -n "$TOOLS_DIR_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5 +$as_echo "$TOOLS_DIR_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$TOOLS_DIR_CC" && break + test -n "$TOOLS_DIR_CXX" && break done - CC=$TOOLS_DIR_CC + CXX=$TOOLS_DIR_CXX PATH="$PATH_save" fi # AC_PATH_PROGS can't be run multiple times with the same variable, # so create a new name for this run. - if test "x$CC" = x; then + if test "x$CXX" = x; then for ac_prog in $SEARCH_LIST do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_POTENTIAL_CC+:} false; then : +if ${ac_cv_path_POTENTIAL_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - case $POTENTIAL_CC in + case $POTENTIAL_CXX in [\\/]* | ?:[\\/]*) - ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path. + ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -29474,7 +29186,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -29485,23 +29197,23 @@ ;; esac fi -POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC -if test -n "$POTENTIAL_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5 -$as_echo "$POTENTIAL_CC" >&6; } +POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX +if test -n "$POTENTIAL_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 +$as_echo "$POTENTIAL_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$POTENTIAL_CC" && break + test -n "$POTENTIAL_CXX" && break done - CC=$POTENTIAL_CC + CXX=$POTENTIAL_CXX fi - if test "x$CC" = x; then + if test "x$CXX" = x; then # Print a helpful message on how to acquire the necessary build dependency. # devkit is the help tag: freetype, cups, pulse, alsa etc @@ -29536,13 +29248,13 @@ fi fi - # Now we have a compiler binary in CC. Make sure it's okay. + # Now we have a compiler binary in CXX. Make sure it's okay. if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$CC" + complete="$CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -29578,14 +29290,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 fi fi @@ -29605,11 +29317,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -29656,7 +29368,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$CC" + complete="$CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -29701,14 +29413,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 fi fi @@ -29754,7 +29466,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$CC" + complete="$CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -29773,20 +29485,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 fi fi @@ -29798,17 +29508,18 @@ fi if test "x$complete" != "x$new_complete"; then - CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;} + CXX="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} fi - TEST_COMPILER="$CC" + TEST_COMPILER="$CXX" # 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 -$as_echo_n "checking resolved symbolic links for CC... " >&6; } + # FIXME: This test should not be needed anymore; we don't do that for any platform. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 +$as_echo_n "checking resolved symbolic links for CXX... " >&6; } if test "x$OPENJDK_BUILD_OS" != xwindows; then # Follow a chain of symbolic links. Use readlink @@ -29860,8 +29571,8 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 $as_echo "$TEST_COMPILER" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 -$as_echo_n "checking if CC is disguised ccache... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 +$as_echo_n "checking if CXX is disguised ccache... " >&6; } COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` if test "x$COMPILER_BASENAME" = "xccache"; then @@ -29873,22 +29584,22 @@ # Remove the path to the fake ccache cc from the PATH RETRY_COMPILER_SAVED_PATH="$PATH" - COMPILER_DIRNAME=`$DIRNAME $CC` + COMPILER_DIRNAME=`$DIRNAME $CXX` PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" # Try again looking for our compiler if test -n "$ac_tool_prefix"; then - for ac_prog in $COMPILER_CHECK_LIST + for ac_prog in $TOOLCHAIN_CXX_BINARY do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then : +if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$PROPER_COMPILER_CC"; then - ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. + if test -n "$PROPER_COMPILER_CXX"; then + ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -29897,7 +29608,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" + ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -29907,32 +29618,32 @@ fi fi -PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC -if test -n "$PROPER_COMPILER_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 -$as_echo "$PROPER_COMPILER_CC" >&6; } +PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX +if test -n "$PROPER_COMPILER_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 +$as_echo "$PROPER_COMPILER_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$PROPER_COMPILER_CC" && break + test -n "$PROPER_COMPILER_CXX" && break done fi -if test -z "$PROPER_COMPILER_CC"; then - ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC - for ac_prog in $COMPILER_CHECK_LIST +if test -z "$PROPER_COMPILER_CXX"; then + ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX + for ac_prog in $TOOLCHAIN_CXX_BINARY do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then : +if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_PROPER_COMPILER_CC"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. + if test -n "$ac_ct_PROPER_COMPILER_CXX"; then + ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -29941,7 +29652,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" + ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -29951,21 +29662,21 @@ fi fi -ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC -if test -n "$ac_ct_PROPER_COMPILER_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 -$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } +ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX +if test -n "$ac_ct_PROPER_COMPILER_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 +$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_PROPER_COMPILER_CC" && break + test -n "$ac_ct_PROPER_COMPILER_CXX" && break done - if test "x$ac_ct_PROPER_COMPILER_CC" = x; then - PROPER_COMPILER_CC="" + if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then + PROPER_COMPILER_CXX="" else case $cross_compiling:$ac_tool_warned in yes:) @@ -29973,7 +29684,7 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC + PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX fi fi @@ -29982,7 +29693,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$PROPER_COMPILER_CC" + complete="$PROPER_COMPILER_CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -30018,14 +29729,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 fi fi @@ -30045,11 +29756,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -30096,7 +29807,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$PROPER_COMPILER_CC" + complete="$PROPER_COMPILER_CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -30141,14 +29852,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 fi fi @@ -30194,7 +29905,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$PROPER_COMPILER_CC" + complete="$PROPER_COMPILER_CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -30213,20 +29924,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 fi fi @@ -30238,15 +29947,15 @@ fi if test "x$complete" != "x$new_complete"; then - PROPER_COMPILER_CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} + PROPER_COMPILER_CXX="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} fi PATH="$RETRY_COMPILER_SAVED_PATH" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 -$as_echo_n "checking for resolved symbolic links for CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 +$as_echo_n "checking for resolved symbolic links for CXX... " >&6; } if test "x$OPENJDK_BUILD_OS" != xwindows; then # Follow a chain of symbolic links. Use readlink @@ -30265,13 +29974,13 @@ fi if test "x$READLINK" != x; then - PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` + PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` else # Save the current directory for restoring afterwards STARTDIR=$PWD COUNTER=0 - sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` - sym_link_file=`$BASENAME $PROPER_COMPILER_CC` + sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` + sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` cd $sym_link_dir # Use -P flag to resolve symlinks in directories. cd `$THEPWDCMD -P` @@ -30291,107 +30000,155 @@ let COUNTER=COUNTER+1 done cd $STARTDIR - PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file + PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 -$as_echo "$PROPER_COMPILER_CC" >&6; } - CC="$PROPER_COMPILER_CC" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 +$as_echo "$PROPER_COMPILER_CXX" >&6; } + CXX="$PROPER_COMPILER_CXX" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 -$as_echo "no, keeping CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 +$as_echo "no, keeping CXX" >&6; } fi - COMPILER=$CC + COMPILER=$CXX COMPILER_NAME=$COMPILER_NAME - if test "x$OPENJDK_TARGET_OS" = xsolaris; then - # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work - COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` - $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then + # cc -V output typically looks like + # cc: Sun C 5.12 Linux_i386 2011/11/16 + COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1` + # Check that this is likely to be the Solaris Studio cc. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null if test $? -ne 0; then - GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - - { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5 -$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 -$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} - as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 - else - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` - COMPILER_VENDOR="Sun Studio" - fi - elif test "x$OPENJDK_TARGET_OS" = xaix; then - COMPILER_VERSION_TEST=`$COMPILER -qversion 2>&1 | $TAIL -n 1` - $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null - if test $? -ne 0; then - as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5 - else - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'` - COMPILER_VENDOR='IBM' - fi - elif test "x$OPENJDK_TARGET_OS" = xwindows; then + ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1` + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Remove usage instructions (if present), and + # collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/ *Uusage:.*//'` + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"` + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + # xlc -qversion output typically looks like + # IBM XL C/C++ for AIX, V11.1 (5724-X13) + # Version: 11.01.0000.0015 + COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1` + # Check that this is likely to be the IBM XL C compiler. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null + if test $? -ne 0; then + ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1` + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # There is no specific version flag, but all output starts with a version string. # First line typically looks something like: # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 - COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` - COMPILER_VENDOR="Microsoft CL.EXE" - COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` - if test "x$OPENJDK_TARGET_CPU" = "xx86"; then - if test "x$COMPILER_CPU_TEST" != "x80x86"; then - as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 - fi - elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then - if test "x$COMPILER_CPU_TEST" != "xx64"; then - as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 - fi - fi - else - COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` + COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` + # Check that this is likely to be Microsoft CL.EXE. + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xgcc; then + # gcc --version output typically looks like + # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1 + # Copyright (C) 2013 Free Software Foundation, Inc. + # This is free software; see the source for copying conditions. There is NO + # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1` # Check that this is likely to be GCC. - $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null if test $? -ne 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 -$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 -$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} - as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 - fi - - # First line typically looks something like: - # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` - COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` - fi - # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) - CC_VERSION="$COMPILER_VERSION" - # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) - CC_VENDOR="$COMPILER_VENDOR" + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Remove Copyright and legalese from version string, and + # collapse into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/ *Copyright .*//'` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'` + elif test "x$TOOLCHAIN_TYPE" = xclang; then + # clang --version output typically looks like + # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) + # clang version 3.3 (tags/RELEASE_33/final) + # or + # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2) + # Target: x86_64-pc-linux-gnu + # Thread model: posix + COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1` + # Check that this is likely to be clang + $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;} + as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + fi + # Collapse compiler output into a single line + COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` + COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'` + else + as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5 + fi + # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker) + CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER" + # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker) + CXX_VERSION_STRING="$COMPILER_VERSION_STRING" - { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 -$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5 +$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;} - # Now that we have resolved CC ourself, let autoconf have its go at it - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in $CC + # Now that we have resolved CXX ourself, let autoconf have its go at it + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in $CXX do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -30400,7 +30157,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -30410,32 +30167,32 @@ fi fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$CC" && break + test -n "$CXX" && break done fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in $CC +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CXX do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -30444,7 +30201,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" + ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -30454,21 +30211,21 @@ fi fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_CC" && break + test -n "$ac_ct_CXX" && break done - if test "x$ac_ct_CC" = x; then - CC="" + if test "x$ac_ct_CXX" = x; then + CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) @@ -30476,18 +30233,14 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CC=$ac_ct_CC + CXX=$ac_ct_CXX fi fi - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - + fi +fi # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -30511,259 +30264,9 @@ test $ac_status = 0; } done -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -30780,33 +30283,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then - GCC=yes + GXX=yes else - GCC= + GXX= fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -30818,10 +30321,10 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes else - CFLAGS="" + CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -30833,11 +30336,11 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -30849,121 +30352,172 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" else - CFLAGS="-g" + CXXFLAGS="-g" fi else - if test "$GCC" = yes; then - CFLAGS="-O2" + if test "$GXX" = yes; then + CXXFLAGS="-O2" else - CFLAGS= + CXXFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + # + # Setup the preprocessor (CPP and CXXCPP) + # + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +rm -f conftest.err conftest.i conftest.$ac_ext -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp @@ -30973,244 +30527,408 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # Option used to tell the compiler whether to create 32- or 64-bit executables - # Notice that CC contains the full compiler path at this point. - case $CC in - *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";; - *) COMPILER_TARGET_BITS_FLAG="-m";; - esac + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + # First separate the path from the arguments. This will split at the first + # space. + complete="$CPP" + path="${complete%% *}" + tmp="$complete EOL" + arguments="${tmp#* }" - ### Locate C++ compiler (CXX) + # Input might be given as Windows format, start by converting to + # unix format. + new_path=`$CYGPATH -u "$path"` - if test "x$OPENJDK_TARGET_OS" = "xwindows"; then - COMPILER_CHECK_LIST="cl" - elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then - COMPILER_CHECK_LIST="CC g++" - elif test "x$OPENJDK_TARGET_OS" = "xaix"; then - # Do not probe for CC on AIX . - COMPILER_CHECK_LIST="xlC_r" + # Now try to locate executable using which + new_path=`$WHICH "$new_path" 2> /dev/null` + # bat and cmd files are not always considered executable in cygwin causing which + # to not find them + if test "x$new_path" = x \ + && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ + && test "x`$LS \"$path\" 2>/dev/null`" != x; then + new_path=`$CYGPATH -u "$path"` + fi + if test "x$new_path" = x; then + # Oops. Which didn't find the executable. + # The splitting of arguments from the executable at a space might have been incorrect, + # since paths with space are more likely in Windows. Give it another try with the whole + # argument. + path="$complete" + arguments="EOL" + new_path=`$CYGPATH -u "$path"` + new_path=`$WHICH "$new_path" 2> /dev/null` + # bat and cmd files are not always considered executable in cygwin causing which + # to not find them + if test "x$new_path" = x \ + && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ + && test "x`$LS \"$path\" 2>/dev/null`" != x; then + new_path=`$CYGPATH -u "$path"` + fi + if test "x$new_path" = x; then + # It's still not found. Now this is an unrecoverable error. + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} + has_space=`$ECHO "$complete" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 +$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} + fi + as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + fi + fi + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file presence. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + # Short path failed, file does not exist as specified. + # Try adding .exe or .cmd + if test -f "${new_path}.exe"; then + input_to_shortpath="${new_path}.exe" + elif test -f "${new_path}.cmd"; then + input_to_shortpath="${new_path}.cmd" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 +$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} + as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + fi else - COMPILER_CHECK_LIST="g++ CC" + input_to_shortpath="$new_path" fi + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + new_path="$input_to_shortpath" - COMPILER_NAME=C++ - SEARCH_LIST="$COMPILER_CHECK_LIST" + input_path="$input_to_shortpath" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-stile (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi - if test "x$CXX" != x; then - # User has supplied compiler name already, always let that override. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5 -$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;} - if test "x`basename $CXX`" = "x$CXX"; then - # A command without a complete path is provided, search $PATH. + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi - for ac_prog in $CXX -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_POTENTIAL_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $POTENTIAL_CXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + # remove trailing .exe if any + new_path="${new_path/%.exe/}" + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + # First separate the path from the arguments. This will split at the first + # space. + complete="$CPP" + path="${complete%% *}" + tmp="$complete EOL" + arguments="${tmp#* }" + + # Input might be given as Windows format, start by converting to + # unix format. + new_path="$path" + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX -if test -n "$POTENTIAL_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 -$as_echo "$POTENTIAL_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + # Now try to locate executable using which + new_path=`$WHICH "$new_path" 2> /dev/null` - test -n "$POTENTIAL_CXX" && break -done + if test "x$new_path" = x; then + # Oops. Which didn't find the executable. + # The splitting of arguments from the executable at a space might have been incorrect, + # since paths with space are more likely in Windows. Give it another try with the whole + # argument. + path="$complete" + arguments="EOL" + new_path="$path" - if test "x$POTENTIAL_CXX" != x; then - CXX=$POTENTIAL_CXX - else - as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5 + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + + new_path=`$WHICH "$new_path" 2> /dev/null` + + if test "x$new_path" = x; then + # It's still not found. Now this is an unrecoverable error. + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} + has_space=`$ECHO "$complete" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 +$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi + as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + fi + fi + + # Now new_path has a complete unix path to the binary + if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then + # Keep paths in /bin as-is, but remove trailing .exe if any + new_path="${new_path/%.exe/}" + # Do not save /bin paths to all_fixpath_prefixes! + else + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $new_path` + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + # Output is in $new_path + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + # remove trailing .exe if any + new_path="${new_path/%.exe/}" + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + fi + + else + # We're on a posix platform. Hooray! :) + # First separate the path from the arguments. This will split at the first + # space. + complete="$CPP" + path="${complete%% *}" + tmp="$complete EOL" + arguments="${tmp#* }" + + # Cannot rely on the command "which" here since it doesn't always work. + is_absolute_path=`$ECHO "$path" | $GREP ^/` + if test -z "$is_absolute_path"; then + # Path to executable is not absolute. Find it. + IFS_save="$IFS" + IFS=: + for p in $PATH; do + if test -f "$p/$path" && test -x "$p/$path"; then + new_path="$p/$path" + break + fi + done + IFS="$IFS_save" else - # Otherwise it might already be a complete path - if test ! -x "$CXX"; then - as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5 + new_path="$path" + fi + + if test "x$new_path" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} + has_space=`$ECHO "$complete" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 +$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi + as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" else - # No user supplied value. Locate compiler ourselves - CXX= - # If TOOLS_DIR is set, check for all compiler names in there first - # before checking the rest of the PATH. - if test -n "$TOOLS_DIR"; then - PATH_save="$PATH" - PATH="$TOOLS_DIR" - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then : + new_complete="$new_path" + fi + + if test "x$complete" != "x$new_complete"; then + CPP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} + fi + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else - case $TOOLS_DIR_CXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : - ;; -esac +else + # Broken: fails on valid input. +continue fi -TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX -if test -n "$TOOLS_DIR_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5 -$as_echo "$TOOLS_DIR_CXX" >&6; } +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Passes both tests. +ac_preproc_ok=: +break fi +rm -f conftest.err conftest.i conftest.$ac_ext - - test -n "$TOOLS_DIR_CXX" && break done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi - CXX=$TOOLS_DIR_CXX - PATH="$PATH_save" - fi + done + ac_cv_prog_CXXCPP=$CXXCPP - # AC_PATH_PROGS can't be run multiple times with the same variable, - # so create a new name for this run. - if test "x$CXX" = x; then - for ac_prog in $SEARCH_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_POTENTIAL_CXX+:} false; then : - $as_echo_n "(cached) " >&6 +fi + CXXCPP=$ac_cv_prog_CXXCPP else - case $POTENTIAL_CXX in - [\\/]* | ?:[\\/]*) - ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : - ;; -esac -fi -POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX -if test -n "$POTENTIAL_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5 -$as_echo "$POTENTIAL_CXX" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + # Broken: fails on valid input. +continue fi +rm -f conftest.err conftest.i conftest.$ac_ext + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext - test -n "$POTENTIAL_CXX" && break done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : - CXX=$POTENTIAL_CXX - fi - - if test "x$CXX" = x; then - - # Print a helpful message on how to acquire the necessary build dependency. - # devkit is the help tag: freetype, cups, pulse, alsa etc - MISSING_DEPENDENCY=devkit - - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - cygwin_help $MISSING_DEPENDENCY - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - msys_help $MISSING_DEPENDENCY - else - PKGHANDLER_COMMAND= - - case $PKGHANDLER in - apt-get) - apt_help $MISSING_DEPENDENCY ;; - yum) - yum_help $MISSING_DEPENDENCY ;; - port) - port_help $MISSING_DEPENDENCY ;; - pkgutil) - pkgutil_help $MISSING_DEPENDENCY ;; - pkgadd) - pkgadd_help $MISSING_DEPENDENCY ;; - esac - - if test "x$PKGHANDLER_COMMAND" != x; then - HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." - fi - fi +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi - as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5 - fi - fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - # Now we have a compiler binary in CXX. Make sure it's okay. if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$CXX" + complete="$CXXCPP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -31246,14 +30964,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 fi fi @@ -31273,11 +30991,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -31324,7 +31042,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$CXX" + complete="$CXXCPP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -31369,14 +31087,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 fi fi @@ -31422,7 +31140,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$CXX" + complete="$CXXCPP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -31441,20 +31159,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 fi fi @@ -31466,98 +31182,30 @@ fi if test "x$complete" != "x$new_complete"; then - CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;} - fi - - TEST_COMPILER="$CXX" - # 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 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 -$as_echo_n "checking resolved symbolic links for CXX... " >&6; } - - if test "x$OPENJDK_BUILD_OS" != xwindows; then - # Follow a chain of symbolic links. Use readlink - # where it exists, else fall back to horribly - # complicated shell code. - if test "x$READLINK_TESTED" != yes; then - # On MacOSX there is a readlink tool with a different - # purpose than the GNU readlink tool. Check the found readlink. - ISGNU=`$READLINK --version 2>&1 | $GREP GNU` - if test "x$ISGNU" = x; then - # A readlink that we do not know how to use. - # Are there other non-GNU readlinks out there? - READLINK_TESTED=yes - READLINK= - fi - fi - - if test "x$READLINK" != x; then - TEST_COMPILER=`$READLINK -f $TEST_COMPILER` - else - # Save the current directory for restoring afterwards - STARTDIR=$PWD - COUNTER=0 - sym_link_dir=`$DIRNAME $TEST_COMPILER` - sym_link_file=`$BASENAME $TEST_COMPILER` - cd $sym_link_dir - # Use -P flag to resolve symlinks in directories. - cd `$THEPWDCMD -P` - sym_link_dir=`$THEPWDCMD -P` - # Resolve file symlinks - while test $COUNTER -lt 20; do - ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` - if test "x$ISLINK" == x; then - # This is not a symbolic link! We are done! - break - fi - # Again resolve directory symlinks since the target of the just found - # link could be in a different directory - cd `$DIRNAME $ISLINK` - sym_link_dir=`$THEPWDCMD -P` - sym_link_file=`$BASENAME $ISLINK` - let COUNTER=COUNTER+1 - done - cd $STARTDIR - TEST_COMPILER=$sym_link_dir/$sym_link_file - fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 -$as_echo "$TEST_COMPILER" >&6; } + CXXCPP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 -$as_echo_n "checking if CXX is disguised ccache... " >&6; } - - COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` - if test "x$COMPILER_BASENAME" = "xccache"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 -$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } - # 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 $CXX` - PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" - # Try again looking for our compiler - if test -n "$ac_tool_prefix"; then - for ac_prog in $COMPILER_CHECK_LIST - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + # + # Setup the linker (LD) + # + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # In the Microsoft toolchain we have a separate LD command "link". + # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is + # a cygwin program for something completely different. + # Extract the first word of "link", so it can be a program name with args. +set dummy link; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then : +if ${ac_cv_prog_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$PROPER_COMPILER_CXX"; then - ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. + if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. else + ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do @@ -31565,7 +31213,11 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" + if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_LD="link" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -31573,84 +31225,36 @@ done IFS=$as_save_IFS -fi -fi -PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX -if test -n "$PROPER_COMPILER_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 -$as_echo "$PROPER_COMPILER_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PROPER_COMPILER_CXX" && break - done -fi -if test -z "$PROPER_COMPILER_CXX"; then - ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX - for ac_prog in $COMPILER_CHECK_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_PROPER_COMPILER_CXX"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_LD + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set LD to just the basename; use the full file name. + shift + ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@" fi -done - done -IFS=$as_save_IFS - fi fi -ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX -if test -n "$ac_ct_PROPER_COMPILER_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 -$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_PROPER_COMPILER_CXX" && break -done - - if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then - PROPER_COMPILER_CXX="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX - fi -fi - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$PROPER_COMPILER_CXX" + complete="$LD" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -31686,14 +31290,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5 fi fi @@ -31713,11 +31317,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -31764,7 +31368,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$PROPER_COMPILER_CXX" + complete="$LD" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -31809,14 +31413,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5 fi fi @@ -31862,7 +31466,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$PROPER_COMPILER_CXX" + complete="$LD" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -31881,20 +31485,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5 fi fi @@ -31906,217 +31508,67 @@ fi if test "x$complete" != "x$new_complete"; then - PROPER_COMPILER_CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} + LD="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;} fi - PATH="$RETRY_COMPILER_SAVED_PATH" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 -$as_echo_n "checking for resolved symbolic links for CXX... " >&6; } - - if test "x$OPENJDK_BUILD_OS" != xwindows; then - # Follow a chain of symbolic links. Use readlink - # where it exists, else fall back to horribly - # complicated shell code. - if test "x$READLINK_TESTED" != yes; then - # On MacOSX there is a readlink tool with a different - # purpose than the GNU readlink tool. Check the found readlink. - ISGNU=`$READLINK --version 2>&1 | $GREP GNU` - if test "x$ISGNU" = x; then - # A readlink that we do not know how to use. - # Are there other non-GNU readlinks out there? - READLINK_TESTED=yes - READLINK= - fi - fi - - if test "x$READLINK" != x; then - PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` + # Verify that we indeed succeeded with this trick. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 +$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; } + "$LD" --version > /dev/null + if test $? -eq 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5 else - # Save the current directory for restoring afterwards - STARTDIR=$PWD - COUNTER=0 - sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` - sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` - cd $sym_link_dir - # Use -P flag to resolve symlinks in directories. - cd `$THEPWDCMD -P` - sym_link_dir=`$THEPWDCMD -P` - # Resolve file symlinks - while test $COUNTER -lt 20; do - ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` - if test "x$ISLINK" == x; then - # This is not a symbolic link! We are done! - break - fi - # Again resolve directory symlinks since the target of the just found - # link could be in a different directory - cd `$DIRNAME $ISLINK` - sym_link_dir=`$THEPWDCMD -P` - sym_link_file=`$BASENAME $ISLINK` - let COUNTER=COUNTER+1 - done - cd $STARTDIR - PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 -$as_echo "$PROPER_COMPILER_CXX" >&6; } - CXX="$PROPER_COMPILER_CXX" + LDCXX="$LD" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 -$as_echo "no, keeping CXX" >&6; } + # All other toolchains use the compiler to link. + LD="$CC" + LDCXX="$CXX" fi + # FIXME: it should be CXXLD, according to standard (cf CXXCPP) - COMPILER=$CXX - COMPILER_NAME=$COMPILER_NAME + # + # Setup the assembler (AS) + # if test "x$OPENJDK_TARGET_OS" = xsolaris; then - # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work - COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` - $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null - if test $? -ne 0; then - GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - - { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5 -$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5 -$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;} - as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5 - else - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"` - COMPILER_VENDOR="Sun Studio" - fi - elif test "x$OPENJDK_TARGET_OS" = xaix; then - COMPILER_VERSION_TEST=`$COMPILER -qversion 2>&1 | $TAIL -n 1` - $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null - if test $? -ne 0; then - as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5 - else - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'` - COMPILER_VENDOR='IBM' - fi - elif test "x$OPENJDK_TARGET_OS" = xwindows; then - # First line typically looks something like: - # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 - COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"` - COMPILER_VENDOR="Microsoft CL.EXE" - COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` - if test "x$OPENJDK_TARGET_CPU" = "xx86"; then - if test "x$COMPILER_CPU_TEST" != "x80x86"; then - as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 - fi - elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then - if test "x$COMPILER_CPU_TEST" != "xx64"; then - as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 - fi - fi - else - COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - # Check that this is likely to be GCC. - $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null - if test $? -ne 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 -$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 -$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} - as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 - fi - - # First line typically looks something like: - # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 - COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"` - COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"` - fi - # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) - CXX_VERSION="$COMPILER_VERSION" - # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) - CXX_VENDOR="$COMPILER_VENDOR" - - { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5 -$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;} - - - # Now that we have resolved CXX ourself, let autoconf have its go at it - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in $CXX - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + # FIXME: should this really be solaris, or solstudio? - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in $CXX + # Publish this variable in the help. + + + if test "x$AS" = x; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in as do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : +if ${ac_cv_path_AS+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $AS in + [\\/]* | ?:[\\/]*) + ac_cv_path_AS="$AS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" + ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -32124,212 +31576,57 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } +AS=$ac_cv_path_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } + test -n "$AS" && break done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" else - CXXFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - ### Locate other tools + # The variable is set, but is it from the command line or the environment? - if test "x$OPENJDK_TARGET_OS" = xmacosx; then - ac_ext=m -ac_cpp='$OBJCPP $CPPFLAGS' -ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_objc_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gcc objcc objc cc CC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 + # Try to remove the string !AS! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/} + if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then + # If it failed, the variable was not from the command line. Ignore it, + # but warn the user (except for BASH, which is always set by the calling BASH). + if test "xAS" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in as +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJC+:} false; then : +if ${ac_cv_path_AS+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OBJC"; then - ac_cv_prog_OBJC="$OBJC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $AS in + [\\/]* | ?:[\\/]*) + ac_cv_path_AS="$AS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" + ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -32337,43 +31634,57 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -OBJC=$ac_cv_prog_OBJC -if test -n "$OBJC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 -$as_echo "$OBJC" >&6; } +AS=$ac_cv_path_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$OBJC" && break - done -fi -if test -z "$OBJC"; then - ac_ct_OBJC=$OBJC - for ac_prog in gcc objcc objc cc CC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 + test -n "$AS" && break +done + + else + # If it succeeded, then it was overridden by the user. We will use it + # for the tool. + + # First remove it from the list of overridden variables, so we can test + # for unknown variables in the end. + CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + + # Check if the provided tool contains a complete path. + tool_specified="$AS" + tool_basename="${tool_specified##*/}" + if test "x$tool_basename" = "x$tool_specified"; then + # A command without a complete path is provided, search $PATH. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;} + # Extract the first word of "$tool_basename", so it can be a program name with args. +set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJC+:} false; then : +if ${ac_cv_path_AS+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJC"; then - ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $AS in + [\\/]* | ?:[\\/]*) + ac_cv_path_AS="$AS" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJC="$ac_prog" + ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -32381,186 +31692,46 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC -if test -n "$ac_ct_OBJC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 -$as_echo "$ac_ct_OBJC" >&6; } +AS=$ac_cv_path_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_OBJC" && break -done - - if test "x$ac_ct_OBJC" = x; then - OBJC="gcc" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJC=$ac_ct_OBJC - fi -fi - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 + if test "x$AS" = x; then + as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 + fi + else + # Otherwise we believe it is a complete path. Use it as it is. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5 +$as_echo_n "checking for AS... " >&6; } + if test ! -x "$tool_specified"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 +$as_echo "$tool_specified" >&6; } + fi + fi fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 -$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } -if ${ac_cv_objc_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_objc_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_objc_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 -$as_echo "$ac_cv_objc_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GOBJC=yes -else - GOBJC= -fi -ac_test_OBJCFLAGS=${OBJCFLAGS+set} -ac_save_OBJCFLAGS=$OBJCFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 -$as_echo_n "checking whether $OBJC accepts -g... " >&6; } -if ${ac_cv_prog_objc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_objc_werror_flag=$ac_objc_werror_flag - ac_objc_werror_flag=yes - ac_cv_prog_objc_g=no - OBJCFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_objc_try_compile "$LINENO"; then : - ac_cv_prog_objc_g=yes -else - OBJCFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_objc_try_compile "$LINENO"; then : - -else - ac_objc_werror_flag=$ac_save_objc_werror_flag - OBJCFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_objc_try_compile "$LINENO"; then : - ac_cv_prog_objc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_objc_werror_flag=$ac_save_objc_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 -$as_echo "$ac_cv_prog_objc_g" >&6; } -if test "$ac_test_OBJCFLAGS" = set; then - OBJCFLAGS=$ac_save_OBJCFLAGS -elif test $ac_cv_prog_objc_g = yes; then - if test "$GOBJC" = yes; then - OBJCFLAGS="-g -O2" - else - OBJCFLAGS="-g" - fi -else - if test "$GOBJC" = yes; then - OBJCFLAGS="-O2" - else - OBJCFLAGS= - fi -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$OBJC" + complete="$AS" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -32596,14 +31767,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 fi fi @@ -32623,11 +31794,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -32674,7 +31845,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$OBJC" + complete="$AS" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -32719,14 +31890,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 fi fi @@ -32772,7 +31943,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$OBJC" + complete="$AS" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -32791,20 +31962,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 fi fi @@ -32816,34 +31985,60 @@ fi if test "x$complete" != "x$new_complete"; then - OBJC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} + AS="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} fi else - OBJC= + # FIXME: is this correct for microsoft? + AS="$CC -c" fi - # Restore the flags to the user specified values. - # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" - CFLAGS="$ORG_CFLAGS" - CXXFLAGS="$ORG_CXXFLAGS" - OBJCFLAGS="$ORG_OBJCFLAGS" - - LD="$CC" - LDEXE="$CC" - LDCXX="$CXX" - LDEXECXX="$CXX" - # LDEXE is the linker to use, when creating executables. - - # Linking C++ libraries. + # + # Setup the archiver (AR) + # + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # The corresponding ar tool is lib.exe (used to create static libraries) + # Extract the first word of "lib", so it can be a program name with args. +set dummy lib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="lib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - # Linking C++ executables. +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - if test "x$OPENJDK_TARGET_OS" != xwindows; then + else # Publish this variable in the help. @@ -33140,6 +32335,7 @@ fi + fi if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then @@ -33376,8 +32572,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -33406,44 +32600,71 @@ $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;} fi - fi - if test "x$OPENJDK_TARGET_OS" = xmacosx; then - ARFLAGS="-r" - elif test "x$OPENJDK_TARGET_OS" = xaix; then - ARFLAGS="-X64" - else - ARFLAGS="" - fi - - # For hotspot, we need these in Windows mixed path; other platforms keep them the same - HOTSPOT_CXX="$CXX" - HOTSPOT_LD="$LD" + if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then + ac_ext=m +ac_cpp='$OBJCPP $CPPFLAGS' +ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_objc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gcc objcc objc cc CC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJC"; then + ac_cv_prog_OBJC="$OBJC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +OBJC=$ac_cv_prog_OBJC +if test -n "$OBJC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5 +$as_echo "$OBJC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - COMPILER_NAME=gcc - COMPILER_TYPE=CC - if test "x$OPENJDK_TARGET_OS" = xwindows; then : - # For now, assume that we are always compiling using cl.exe. - CC_OUT_OPTION=-Fo - EXE_OUT_OPTION=-out: - LD_OUT_OPTION=-out: - AR_OUT_OPTION=-out: - # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin - # program for something completely different. - # Extract the first word of "link", so it can be a program name with args. -set dummy link; ac_word=$2 + test -n "$OBJC" && break + done +fi +if test -z "$OBJC"; then + ac_ct_OBJC=$OBJC + for ac_prog in gcc objcc objc cc CC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_WINLD+:} false; then : +if ${ac_cv_prog_ac_ct_OBJC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$WINLD"; then - ac_cv_prog_WINLD="$WINLD" # Let the user override the test. + if test -n "$ac_ct_OBJC"; then + ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test. else - ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do @@ -33451,11 +32672,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_WINLD="link" + ac_cv_prog_ac_ct_OBJC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -33463,38 +32680,186 @@ done IFS=$as_save_IFS -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_WINLD - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set WINLD to just the basename; use the full file name. - shift - ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@" - fi fi fi -fi -WINLD=$ac_cv_prog_WINLD -if test -n "$WINLD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5 -$as_echo "$WINLD" >&6; } +ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC +if test -n "$ac_ct_OBJC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5 +$as_echo "$ac_ct_OBJC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - # Since we must ignore the first found link, WINLD will contain - # the full path to the link.exe program. + test -n "$ac_ct_OBJC" && break +done + + if test "x$ac_ct_OBJC" = x; then + OBJC="gcc" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJC=$ac_ct_OBJC + fi +fi + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5 +$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; } +if ${ac_cv_objc_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_objc_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_objc_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5 +$as_echo "$ac_cv_objc_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GOBJC=yes +else + GOBJC= +fi +ac_test_OBJCFLAGS=${OBJCFLAGS+set} +ac_save_OBJCFLAGS=$OBJCFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5 +$as_echo_n "checking whether $OBJC accepts -g... " >&6; } +if ${ac_cv_prog_objc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_objc_werror_flag=$ac_objc_werror_flag + ac_objc_werror_flag=yes + ac_cv_prog_objc_g=no + OBJCFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_objc_try_compile "$LINENO"; then : + ac_cv_prog_objc_g=yes +else + OBJCFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_objc_try_compile "$LINENO"; then : + +else + ac_objc_werror_flag=$ac_save_objc_werror_flag + OBJCFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_objc_try_compile "$LINENO"; then : + ac_cv_prog_objc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_objc_werror_flag=$ac_save_objc_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5 +$as_echo "$ac_cv_prog_objc_g" >&6; } +if test "$ac_test_OBJCFLAGS" = set; then + OBJCFLAGS=$ac_save_OBJCFLAGS +elif test $ac_cv_prog_objc_g = yes; then + if test "$GOBJC" = yes; then + OBJCFLAGS="-g -O2" + else + OBJCFLAGS="-g" + fi +else + if test "$GOBJC" = yes; then + OBJCFLAGS="-O2" + else + OBJCFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$WINLD" + complete="$OBJC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -33530,14 +32895,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 fi fi @@ -33557,11 +32922,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -33608,7 +32973,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$WINLD" + complete="$OBJC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -33653,14 +33018,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 fi fi @@ -33706,7 +33071,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$WINLD" + complete="$OBJC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -33725,20 +33090,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5 fi fi @@ -33750,51 +33113,40 @@ fi if test "x$complete" != "x$new_complete"; then - WINLD="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;} + OBJC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;} fi - printf "Windows linker was found at $WINLD\n" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5 -$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; } - "$WINLD" --version > /dev/null - if test $? -eq 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - fi - LD="$WINLD" - LDEXE="$WINLD" - LDCXX="$WINLD" - LDEXECXX="$WINLD" - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; ac_word=$2 + + # Publish this variable in the help. + + + if test "x$LIPO" = x; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in lipo +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MT+:} false; then : +if ${ac_cv_path_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MT"; then - ac_cv_prog_MT="$MT" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $LIPO in + [\\/]* | ?:[\\/]*) + ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_MT="mt" + ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -33802,36 +33154,162 @@ done IFS=$as_save_IFS -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_MT - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set MT to just the basename; use the full file name. - shift - ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@" + ;; +esac +fi +LIPO=$ac_cv_path_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LIPO" && break +done + + else + # The variable is set, but is it from the command line or the environment? + + # Try to remove the string !LIPO! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/} + if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then + # If it failed, the variable was not from the command line. Ignore it, + # but warn the user (except for BASH, which is always set by the calling BASH). + if test "xLIPO" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in lipo +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LIPO in + [\\/]* | ?:[\\/]*) + ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi +done + done +IFS=$as_save_IFS + + ;; +esac fi +LIPO=$ac_cv_path_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + + + test -n "$LIPO" && break +done + + else + # If it succeeded, then it was overridden by the user. We will use it + # for the tool. + + # First remove it from the list of overridden variables, so we can test + # for unknown variables in the end. + CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + + # Check if the provided tool contains a complete path. + tool_specified="$LIPO" + tool_basename="${tool_specified##*/}" + if test "x$tool_basename" = "x$tool_specified"; then + # A command without a complete path is provided, search $PATH. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;} + # Extract the first word of "$tool_basename", so it can be a program name with args. +set dummy $tool_basename; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LIPO+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LIPO in + [\\/]* | ?:[\\/]*) + ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac fi -MT=$ac_cv_prog_MT -if test -n "$MT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5 -$as_echo "$MT" >&6; } +LIPO=$ac_cv_path_LIPO +if test -n "$LIPO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +$as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + if test "x$LIPO" = x; then + as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 + fi + else + # Otherwise we believe it is a complete path. Use it as it is. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5 +$as_echo_n "checking for LIPO... " >&6; } + if test ! -x "$tool_specified"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 +$as_echo "$tool_specified" >&6; } + fi + fi + fi + + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$MT" + complete="$LIPO" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -33867,14 +33345,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 fi fi @@ -33894,11 +33372,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -33945,7 +33423,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$MT" + complete="$LIPO" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -33990,14 +33468,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 fi fi @@ -34043,7 +33521,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$MT" + complete="$LIPO" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34062,20 +33540,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 fi fi @@ -34087,21 +33563,25 @@ fi if test "x$complete" != "x$new_complete"; then - MT="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} + LIPO="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} fi - # The resource compiler - # Extract the first word of "rc", so it can be a program name with args. -set dummy rc; ac_word=$2 + else + OBJC= + fi + + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RC+:} false; then : +if ${ac_cv_prog_MT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$RC"; then - ac_cv_prog_RC="$RC" # Let the user override the test. + if test -n "$MT"; then + ac_cv_prog_MT="$MT" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -34111,11 +33591,11 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then ac_prog_rejected=yes continue fi - ac_cv_prog_RC="rc" + ac_cv_prog_MT="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -34125,22 +33605,22 @@ if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_RC + set dummy $ac_cv_prog_MT shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen - # first if we set RC to just the basename; use the full file name. + # first if we set MT to just the basename; use the full file name. shift - ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@" fi fi fi fi -RC=$ac_cv_prog_RC -if test -n "$RC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 -$as_echo "$RC" >&6; } +MT=$ac_cv_prog_MT +if test -n "$MT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5 +$as_echo "$MT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -34152,7 +33632,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$RC" + complete="$MT" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34188,14 +33668,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 fi fi @@ -34215,11 +33695,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -34266,7 +33746,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$RC" + complete="$MT" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34311,14 +33791,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 fi fi @@ -34364,7 +33844,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$RC" + complete="$MT" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34383,20 +33863,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5 fi fi @@ -34408,93 +33886,23 @@ fi if test "x$complete" != "x$new_complete"; then - RC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} - fi - - - # For hotspot, we need these in Windows mixed path, - # so rewrite them all. Need added .exe suffix. - HOTSPOT_CXX="$CXX.exe" - HOTSPOT_LD="$LD.exe" - HOTSPOT_MT="$MT.exe" - HOTSPOT_RC="$RC.exe" - - unix_path="$HOTSPOT_CXX" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - windows_path=`$CYGPATH -m "$unix_path"` - HOTSPOT_CXX="$windows_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - windows_path=`cmd //c echo $unix_path` - HOTSPOT_CXX="$windows_path" - fi - - - unix_path="$HOTSPOT_LD" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - windows_path=`$CYGPATH -m "$unix_path"` - HOTSPOT_LD="$windows_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - windows_path=`cmd //c echo $unix_path` - HOTSPOT_LD="$windows_path" - fi - - - unix_path="$HOTSPOT_MT" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - windows_path=`$CYGPATH -m "$unix_path"` - HOTSPOT_MT="$windows_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - windows_path=`cmd //c echo $unix_path` - HOTSPOT_MT="$windows_path" - fi - - - unix_path="$HOTSPOT_RC" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - windows_path=`$CYGPATH -m "$unix_path"` - HOTSPOT_RC="$windows_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - windows_path=`cmd //c echo $unix_path` - HOTSPOT_RC="$windows_path" + MT="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;} fi - - - - RC_FLAGS="-nologo -l 0x409 -r" - if test "x$VARIANT" = xOPT; then : - - RC_FLAGS="$RC_FLAGS -d NDEBUG" - -fi - - # The version variables used to create RC_FLAGS may be overridden - # in a custom configure script, or possibly the command line. - # Let those variables be expanded at make time in spec.gmk. - # The \$ are escaped to the shell, and the $(...) variables - # are evaluated by make. - RC_FLAGS="$RC_FLAGS \ - -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \ - -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \ - -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ - -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \ - -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ - -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \ - -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\"" - - # lib.exe is used to create static libraries. - # Extract the first word of "lib", so it can be a program name with args. -set dummy lib; ac_word=$2 + # Setup the resource compiler (RC) + # Extract the first word of "rc", so it can be a program name with args. +set dummy rc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_WINAR+:} false; then : +if ${ac_cv_prog_RC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$WINAR"; then - ac_cv_prog_WINAR="$WINAR" # Let the user override the test. + if test -n "$RC"; then + ac_cv_prog_RC="$RC" # Let the user override the test. else + ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do @@ -34502,7 +33910,11 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_WINAR="lib" + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_RC="rc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -34510,12 +33922,24 @@ done IFS=$as_save_IFS +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_RC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set RC to just the basename; use the full file name. + shift + ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@" + fi +fi fi fi -WINAR=$ac_cv_prog_WINAR -if test -n "$WINAR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5 -$as_echo "$WINAR" >&6; } +RC=$ac_cv_prog_RC +if test -n "$RC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 +$as_echo "$RC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -34527,7 +33951,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$WINAR" + complete="$RC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34563,14 +33987,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 fi fi @@ -34590,11 +34014,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -34641,7 +34065,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$WINAR" + complete="$RC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34686,14 +34110,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 fi fi @@ -34739,7 +34163,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$WINAR" + complete="$RC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -34758,20 +34182,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5 fi fi @@ -34783,15 +34205,12 @@ fi if test "x$complete" != "x$new_complete"; then - WINAR="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;} + RC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;} fi - AR="$WINAR" - ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" - - # Extract the first word of "dumpbin", so it can be a program name with args. + # Extract the first word of "dumpbin", so it can be a program name with args. set dummy dumpbin; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } @@ -35064,8 +34483,6 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;} new_path="$path" fi @@ -35094,157 +34511,201 @@ $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;} fi + fi - COMPILER_TYPE=CL - CCXXFLAGS="$CCXXFLAGS -nologo" + if test "x$OPENJDK_TARGET_OS" = xsolaris; then -fi + # Publish this variable in the help. - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + if test "x$STRIP" = x; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in strip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes + case $STRIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue + ;; +esac fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +STRIP=$ac_cv_path_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.i conftest.$ac_ext + + test -n "$STRIP" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CPP=$CPP + else + # The variable is set, but is it from the command line or the environment? -fi - CPP=$ac_cv_prog_CPP + # Try to remove the string !STRIP! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/} + if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then + # If it failed, the variable was not from the command line. Ignore it, + # but warn the user (except for BASH, which is always set by the calling BASH). + if test "xSTRIP" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in strip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes + case $STRIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue + ;; +esac fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +STRIP=$ac_cv_path_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.i conftest.$ac_ext + + test -n "$STRIP" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : + else + # If it succeeded, then it was overridden by the user. We will use it + # for the tool. + + # First remove it from the list of overridden variables, so we can test + # for unknown variables in the end. + CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + + # Check if the provided tool contains a complete path. + tool_specified="$STRIP" + tool_basename="${tool_specified##*/}" + if test "x$tool_basename" = "x$tool_specified"; then + # A command without a complete path is provided, search $PATH. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;} + # Extract the first word of "$tool_basename", so it can be a program name with args. +set dummy $tool_basename; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + case $STRIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +STRIP=$ac_cv_path_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test "x$STRIP" = x; then + as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 + fi + else + # Otherwise we believe it is a complete path. Use it as it is. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5 +$as_echo_n "checking for STRIP... " >&6; } + if test ! -x "$tool_specified"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 +$as_echo "$tool_specified" >&6; } + fi + fi + fi + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$CPP" + complete="$STRIP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -35280,14 +34741,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi fi @@ -35307,11 +34768,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -35358,7 +34819,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$CPP" + complete="$STRIP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -35403,14 +34864,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi fi @@ -35456,7 +34917,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$CPP" + complete="$STRIP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -35475,20 +34936,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi fi @@ -35500,151 +34959,203 @@ fi if test "x$complete" != "x$new_complete"; then - CPP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;} + STRIP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if ${ac_cv_prog_CXXCPP+:} false; then : + + # Publish this variable in the help. + + + if test "x$NM" = x; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in nm +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes + case $NM in + [\\/]* | ?:[\\/]*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue + ;; +esac fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +NM=$ac_cv_path_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.i conftest.$ac_ext + + test -n "$NM" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CXXCPP=$CXXCPP + else + # The variable is set, but is it from the command line or the environment? -fi - CXXCPP=$ac_cv_prog_CXXCPP + # Try to remove the string !NM! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/} + if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then + # If it failed, the variable was not from the command line. Ignore it, + # but warn the user (except for BASH, which is always set by the calling BASH). + if test "xNM" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;} + fi + # Try to locate tool using the code snippet + for ac_prog in nm +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes + case $NM in + [\\/]* | ?:[\\/]*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -else - # Broken: fails on valid input. -continue + ;; +esac fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue +NM=$ac_cv_path_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } else - # Passes both tests. -ac_preproc_ok=: -break + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.i conftest.$ac_ext + + test -n "$NM" && break done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : + else + # If it succeeded, then it was overridden by the user. We will use it + # for the tool. + + # First remove it from the list of overridden variables, so we can test + # for unknown variables in the end. + CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" + + # Check if the provided tool contains a complete path. + tool_specified="$NM" + tool_basename="${tool_specified##*/}" + if test "x$tool_basename" = "x$tool_specified"; then + # A command without a complete path is provided, search $PATH. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;} + # Extract the first word of "$tool_basename", so it can be a program name with args. +set dummy $tool_basename; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_NM+:} false; then : + $as_echo_n "(cached) " >&6 else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } + case $NM in + [\\/]* | ?:[\\/]*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +NM=$ac_cv_path_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + if test "x$NM" = x; then + as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 + fi + else + # Otherwise we believe it is a complete path. Use it as it is. + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5 +$as_echo_n "checking for NM... " >&6; } + if test ! -x "$tool_specified"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 +$as_echo "$tool_specified" >&6; } + fi + fi + fi + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$CXXCPP" + complete="$NM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -35680,14 +35191,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi fi @@ -35707,11 +35218,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -35758,7 +35269,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$CXXCPP" + complete="$NM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -35803,14 +35314,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi fi @@ -35856,7 +35367,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$CXXCPP" + complete="$NM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -35875,20 +35386,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi fi @@ -35900,53 +35409,30 @@ fi if test "x$complete" != "x$new_complete"; then - CXXCPP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;} - fi - - - if test "x$COMPILE_TYPE" != "xcross"; then - # If we are not cross compiling, use the same compilers for - # building the build platform executables. The cross-compilation - # case needed to be done earlier, but this can only be done after - # the native tools have been localized. - BUILD_CC="$CC" - BUILD_CXX="$CXX" - BUILD_LD="$LD" - fi - - # for solaris we really need solaris tools, and not gnu equivalent - # these seems to normally reside in /usr/ccs/bin so add that to path before - # starting to probe - # - # NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH - # so that it can be overriden --with-tools-dir - if test "x$OPENJDK_BUILD_OS" = xsolaris; then - PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" + NM="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} fi - # Find the right assembler. - if test "x$OPENJDK_TARGET_OS" = xsolaris; then # Publish this variable in the help. - if test "x$AS" = x; then + if test "x$GNM" = x; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in as + for ac_prog in gnm do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AS+:} false; then : +if ${ac_cv_path_GNM+:} false; then : $as_echo_n "(cached) " >&6 else - case $AS in + case $GNM in [\\/]* | ?:[\\/]*) - ac_cv_path_AS="$AS" # Let the user override the test with a path. + ac_cv_path_GNM="$GNM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -35956,7 +35442,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -35967,44 +35453,44 @@ ;; esac fi -AS=$ac_cv_path_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } +GNM=$ac_cv_path_GNM +if test -n "$GNM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 +$as_echo "$GNM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$AS" && break + test -n "$GNM" && break done else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !AS! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/} + # Try to remove the string !GNM! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xAS" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;} + if test "xGNM" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in as + for ac_prog in gnm do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AS+:} false; then : +if ${ac_cv_path_GNM+:} false; then : $as_echo_n "(cached) " >&6 else - case $AS in + case $GNM in [\\/]* | ?:[\\/]*) - ac_cv_path_AS="$AS" # Let the user override the test with a path. + ac_cv_path_GNM="$GNM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -36014,7 +35500,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36025,17 +35511,17 @@ ;; esac fi -AS=$ac_cv_path_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } +GNM=$ac_cv_path_GNM +if test -n "$GNM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 +$as_echo "$GNM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$AS" && break + test -n "$GNM" && break done else @@ -36047,22 +35533,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$AS" + tool_specified="$GNM" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_AS+:} false; then : +if ${ac_cv_path_GNM+:} false; then : $as_echo_n "(cached) " >&6 else - case $AS in + case $GNM in [\\/]* | ?:[\\/]*) - ac_cv_path_AS="$AS" # Let the user override the test with a path. + ac_cv_path_GNM="$GNM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -36072,7 +35558,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36083,29 +35569,29 @@ ;; esac fi -AS=$ac_cv_path_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } +GNM=$ac_cv_path_GNM +if test -n "$GNM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 +$as_echo "$GNM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$AS" = x; then + if test "x$GNM" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5 -$as_echo_n "checking for AS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5 +$as_echo_n "checking for GNM... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -36119,7 +35605,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$AS" + complete="$GNM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -36155,14 +35641,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 fi fi @@ -36182,11 +35668,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -36233,7 +35719,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$AS" + complete="$GNM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -36278,14 +35764,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 fi fi @@ -36331,7 +35817,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$AS" + complete="$GNM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -36350,20 +35836,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 fi fi @@ -36375,36 +35859,31 @@ fi if test "x$complete" != "x$new_complete"; then - AS="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;} - fi - - else - AS="$CC -c" + GNM="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;} fi - if test "x$OPENJDK_TARGET_OS" = xsolaris; then # Publish this variable in the help. - if test "x$NM" = x; then + if test "x$MCS" = x; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in nm + for ac_prog in mcs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NM+:} false; then : +if ${ac_cv_path_MCS+:} false; then : $as_echo_n "(cached) " >&6 else - case $NM in + case $MCS in [\\/]* | ?:[\\/]*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. + ac_cv_path_MCS="$MCS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -36414,7 +35893,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36425,44 +35904,44 @@ ;; esac fi -NM=$ac_cv_path_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +MCS=$ac_cv_path_MCS +if test -n "$MCS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 +$as_echo "$MCS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$NM" && break + test -n "$MCS" && break done else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !NM! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/} + # Try to remove the string !MCS! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xNM" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;} + if test "xMCS" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in nm + for ac_prog in mcs do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NM+:} false; then : +if ${ac_cv_path_MCS+:} false; then : $as_echo_n "(cached) " >&6 else - case $NM in + case $MCS in [\\/]* | ?:[\\/]*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. + ac_cv_path_MCS="$MCS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -36472,7 +35951,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36483,17 +35962,17 @@ ;; esac fi -NM=$ac_cv_path_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +MCS=$ac_cv_path_MCS +if test -n "$MCS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 +$as_echo "$MCS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$NM" && break + test -n "$MCS" && break done else @@ -36505,22 +35984,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$NM" + tool_specified="$MCS" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NM+:} false; then : +if ${ac_cv_path_MCS+:} false; then : $as_echo_n "(cached) " >&6 else - case $NM in + case $MCS in [\\/]* | ?:[\\/]*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. + ac_cv_path_MCS="$MCS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -36530,7 +36009,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36541,29 +36020,29 @@ ;; esac fi -NM=$ac_cv_path_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +MCS=$ac_cv_path_MCS +if test -n "$MCS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 +$as_echo "$MCS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$NM" = x; then + if test "x$MCS" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5 -$as_echo_n "checking for NM... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5 +$as_echo_n "checking for MCS... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -36577,7 +36056,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$NM" + complete="$MCS" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -36613,14 +36092,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 fi fi @@ -36640,11 +36119,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -36691,7 +36170,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$NM" + complete="$MCS" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -36736,14 +36215,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 fi fi @@ -36789,7 +36268,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$NM" + complete="$MCS" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -36808,20 +36287,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 fi fi @@ -36833,40 +36310,85 @@ fi if test "x$complete" != "x$new_complete"; then - NM="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} + MCS="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} fi + elif test "x$OPENJDK_TARGET_OS" != xwindows; then + # FIXME: we should unify this with the solaris case above. # Publish this variable in the help. - if test "x$GNM" = x; then + if test "x$STRIP" = x; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in gnm + if test -n "$ac_tool_prefix"; then + for ac_prog in strip + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$STRIP" && break + done +fi +if test -z "$STRIP"; then + ac_ct_STRIP=$STRIP + for ac_prog in strip do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GNM+:} false; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else - case $GNM in - [\\/]* | ?:[\\/]*) - ac_cv_path_GNM="$GNM" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_STRIP="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36874,57 +36396,112 @@ done IFS=$as_save_IFS - ;; -esac fi -GNM=$ac_cv_path_GNM -if test -n "$GNM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 -$as_echo "$GNM" >&6; } +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$GNM" && break + test -n "$ac_ct_STRIP" && break done + if test "x$ac_ct_STRIP" = x; then + STRIP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +fi + else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !GNM! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/} + # Try to remove the string !STRIP! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xGNM" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;} + if test "xSTRIP" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in gnm + if test -n "$ac_tool_prefix"; then + for ac_prog in strip + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$STRIP" && break + done +fi +if test -z "$STRIP"; then + ac_ct_STRIP=$STRIP + for ac_prog in strip do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GNM+:} false; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else - case $GNM in - [\\/]* | ?:[\\/]*) - ac_cv_path_GNM="$GNM" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_STRIP="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36932,22 +36509,34 @@ done IFS=$as_save_IFS - ;; -esac fi -GNM=$ac_cv_path_GNM -if test -n "$GNM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 -$as_echo "$GNM" >&6; } +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$GNM" && break + test -n "$ac_ct_STRIP" && break done + if test "x$ac_ct_STRIP" = x; then + STRIP="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +fi + else # If it succeeded, then it was overridden by the user. We will use it # for the tool. @@ -36957,22 +36546,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$GNM" + tool_specified="$STRIP" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GNM+:} false; then : +if ${ac_cv_path_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else - case $GNM in + case $STRIP in [\\/]* | ?:[\\/]*) - ac_cv_path_GNM="$GNM" # Let the user override the test with a path. + ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -36982,7 +36571,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -36993,29 +36582,29 @@ ;; esac fi -GNM=$ac_cv_path_GNM -if test -n "$GNM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5 -$as_echo "$GNM" >&6; } +STRIP=$ac_cv_path_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$GNM" = x; then + if test "x$STRIP" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5 -$as_echo_n "checking for GNM... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5 +$as_echo_n "checking for STRIP... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -37029,7 +36618,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$GNM" + complete="$STRIP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37065,14 +36654,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi fi @@ -37092,11 +36681,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -37143,7 +36732,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$GNM" + complete="$STRIP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37188,14 +36777,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi fi @@ -37241,7 +36830,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$GNM" + complete="$STRIP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37260,20 +36849,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 fi fi @@ -37285,9 +36872,9 @@ fi if test "x$complete" != "x$new_complete"; then - GNM="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;} + STRIP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} fi @@ -37295,30 +36882,73 @@ # Publish this variable in the help. - if test "x$STRIP" = x; then + if test "x$NM" = x; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in strip + if test -n "$ac_tool_prefix"; then + for ac_prog in nm + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NM="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$NM" && break + done +fi +if test -z "$NM"; then + ac_ct_NM=$NM + for ac_prog in nm do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_STRIP+:} false; then : +if ${ac_cv_prog_ac_ct_NM+:} false; then : $as_echo_n "(cached) " >&6 else - case $STRIP in - [\\/]* | ?:[\\/]*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_NM="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -37326,57 +36956,112 @@ done IFS=$as_save_IFS - ;; -esac fi -STRIP=$ac_cv_path_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +fi +ac_ct_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$STRIP" && break + test -n "$ac_ct_NM" && break done + if test "x$ac_ct_NM" = x; then + NM="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NM=$ac_ct_NM + fi +fi + else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !STRIP! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/} + # Try to remove the string !NM! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xSTRIP" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;} + if test "xNM" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in strip + if test -n "$ac_tool_prefix"; then + for ac_prog in nm + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NM="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$NM" && break + done +fi +if test -z "$NM"; then + ac_ct_NM=$NM + for ac_prog in nm do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_STRIP+:} false; then : +if ${ac_cv_prog_ac_ct_NM+:} false; then : $as_echo_n "(cached) " >&6 else - case $STRIP in - [\\/]* | ?:[\\/]*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_NM="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -37384,22 +37069,34 @@ done IFS=$as_save_IFS - ;; -esac fi -STRIP=$ac_cv_path_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +fi +ac_ct_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$STRIP" && break + test -n "$ac_ct_NM" && break done + if test "x$ac_ct_NM" = x; then + NM="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + NM=$ac_ct_NM + fi +fi + else # If it succeeded, then it was overridden by the user. We will use it # for the tool. @@ -37409,22 +37106,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$STRIP" + tool_specified="$NM" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_STRIP+:} false; then : +if ${ac_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else - case $STRIP in + case $NM in [\\/]* | ?:[\\/]*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. + ac_cv_path_NM="$NM" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -37434,7 +37131,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -37445,29 +37142,29 @@ ;; esac fi -STRIP=$ac_cv_path_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +NM=$ac_cv_path_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$STRIP" = x; then + if test "x$NM" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5 -$as_echo_n "checking for STRIP... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5 +$as_echo_n "checking for NM... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -37481,7 +37178,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$STRIP" + complete="$NM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37517,14 +37214,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi fi @@ -37544,11 +37241,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -37595,7 +37292,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$STRIP" + complete="$NM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37640,14 +37337,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi fi @@ -37693,7 +37390,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$STRIP" + complete="$NM" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37712,20 +37409,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 fi fi @@ -37737,40 +37432,90 @@ fi if test "x$complete" != "x$new_complete"; then - STRIP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} + NM="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} + fi + + GNM="$NM" + fi + # objcopy is used for moving debug symbols to separate files when + # full debug symbols are enabled. + if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then # Publish this variable in the help. - if test "x$MCS" = x; then + if test "x$OBJCOPY" = x; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in mcs + if test -n "$ac_tool_prefix"; then + for ac_prog in gobjcopy objcopy + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJCOPY+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJCOPY"; then + ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJCOPY=$ac_cv_prog_OBJCOPY +if test -n "$OBJCOPY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 +$as_echo "$OBJCOPY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$OBJCOPY" && break + done +fi +if test -z "$OBJCOPY"; then + ac_ct_OBJCOPY=$OBJCOPY + for ac_prog in gobjcopy objcopy do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MCS+:} false; then : +if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : $as_echo_n "(cached) " >&6 else - case $MCS in - [\\/]* | ?:[\\/]*) - ac_cv_path_MCS="$MCS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_OBJCOPY"; then + ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -37778,57 +37523,112 @@ done IFS=$as_save_IFS - ;; -esac fi -MCS=$ac_cv_path_MCS -if test -n "$MCS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 -$as_echo "$MCS" >&6; } +fi +ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY +if test -n "$ac_ct_OBJCOPY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 +$as_echo "$ac_ct_OBJCOPY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MCS" && break + test -n "$ac_ct_OBJCOPY" && break done + if test "x$ac_ct_OBJCOPY" = x; then + OBJCOPY="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJCOPY=$ac_ct_OBJCOPY + fi +fi + else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !MCS! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/} + # Try to remove the string !OBJCOPY! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xMCS" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;} + if test "xOBJCOPY" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in mcs + if test -n "$ac_tool_prefix"; then + for ac_prog in gobjcopy objcopy + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJCOPY+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJCOPY"; then + ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJCOPY=$ac_cv_prog_OBJCOPY +if test -n "$OBJCOPY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 +$as_echo "$OBJCOPY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$OBJCOPY" && break + done +fi +if test -z "$OBJCOPY"; then + ac_ct_OBJCOPY=$OBJCOPY + for ac_prog in gobjcopy objcopy do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MCS+:} false; then : +if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : $as_echo_n "(cached) " >&6 else - case $MCS in - [\\/]* | ?:[\\/]*) - ac_cv_path_MCS="$MCS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$ac_ct_OBJCOPY"; then + ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -37836,22 +37636,34 @@ done IFS=$as_save_IFS - ;; -esac fi -MCS=$ac_cv_path_MCS -if test -n "$MCS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 -$as_echo "$MCS" >&6; } +fi +ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY +if test -n "$ac_ct_OBJCOPY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 +$as_echo "$ac_ct_OBJCOPY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MCS" && break + test -n "$ac_ct_OBJCOPY" && break done + if test "x$ac_ct_OBJCOPY" = x; then + OBJCOPY="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJCOPY=$ac_ct_OBJCOPY + fi +fi + else # If it succeeded, then it was overridden by the user. We will use it # for the tool. @@ -37861,22 +37673,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$MCS" + tool_specified="$OBJCOPY" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MCS+:} false; then : +if ${ac_cv_path_OBJCOPY+:} false; then : $as_echo_n "(cached) " >&6 else - case $MCS in + case $OBJCOPY in [\\/]* | ?:[\\/]*) - ac_cv_path_MCS="$MCS" # Let the user override the test with a path. + ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -37886,7 +37698,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -37897,29 +37709,29 @@ ;; esac fi -MCS=$ac_cv_path_MCS -if test -n "$MCS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5 -$as_echo "$MCS" >&6; } +OBJCOPY=$ac_cv_path_OBJCOPY +if test -n "$OBJCOPY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 +$as_echo "$OBJCOPY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$MCS" = x; then + if test "x$OBJCOPY" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5 -$as_echo_n "checking for MCS... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5 +$as_echo_n "checking for OBJCOPY... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -37928,12 +37740,14 @@ fi + # Only call fixup if objcopy was found. + if test -n "$OBJCOPY"; then if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$MCS" + complete="$OBJCOPY" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -37969,14 +37783,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 fi fi @@ -37996,11 +37810,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -38047,7 +37861,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$MCS" + complete="$OBJCOPY" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -38092,14 +37906,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 fi fi @@ -38145,7 +37959,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$MCS" + complete="$OBJCOPY" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -38164,20 +37978,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 fi fi @@ -38189,31 +38001,33 @@ fi if test "x$complete" != "x$new_complete"; then - MCS="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;} + OBJCOPY="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} + fi + + fi fi - elif test "x$OPENJDK_TARGET_OS" != xwindows; then # Publish this variable in the help. - if test "x$NM" = x; then + if test "x$OBJDUMP" = x; then # The variable is not set by user, try to locate tool using the code snippet if test -n "$ac_tool_prefix"; then - for ac_prog in nm + for ac_prog in gobjdump objdump do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NM+:} false; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$NM"; then - ac_cv_prog_NM="$NM" # Let the user override the test. + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -38222,7 +38036,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NM="$ac_tool_prefix$ac_prog" + ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38232,32 +38046,32 @@ fi fi -NM=$ac_cv_prog_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$NM" && break + test -n "$OBJDUMP" && break done fi -if test -z "$NM"; then - ac_ct_NM=$NM - for ac_prog in nm +if test -z "$OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + for ac_prog in gobjdump objdump do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NM+:} false; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_NM"; then - ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -38266,7 +38080,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NM="$ac_prog" + ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38276,21 +38090,21 @@ fi fi -ac_ct_NM=$ac_cv_prog_ac_ct_NM -if test -n "$ac_ct_NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 -$as_echo "$ac_ct_NM" >&6; } +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_NM" && break + test -n "$ac_ct_OBJDUMP" && break done - if test "x$ac_ct_NM" = x; then - NM="" + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="" else case $cross_compiling:$ac_tool_warned in yes:) @@ -38298,35 +38112,35 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - NM=$ac_ct_NM + OBJDUMP=$ac_ct_OBJDUMP fi fi else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !NM! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/} + # Try to remove the string !OBJDUMP! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xNM" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;} + if test "xOBJDUMP" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet if test -n "$ac_tool_prefix"; then - for ac_prog in nm + for ac_prog in gobjdump objdump do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NM+:} false; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$NM"; then - ac_cv_prog_NM="$NM" # Let the user override the test. + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -38335,7 +38149,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NM="$ac_tool_prefix$ac_prog" + ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38345,32 +38159,32 @@ fi fi -NM=$ac_cv_prog_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$NM" && break + test -n "$OBJDUMP" && break done fi -if test -z "$NM"; then - ac_ct_NM=$NM - for ac_prog in nm +if test -z "$OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + for ac_prog in gobjdump objdump do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NM+:} false; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_NM"; then - ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test. + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -38379,7 +38193,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NM="$ac_prog" + ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38389,21 +38203,21 @@ fi fi -ac_ct_NM=$ac_cv_prog_ac_ct_NM -if test -n "$ac_ct_NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 -$as_echo "$ac_ct_NM" >&6; } +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_NM" && break + test -n "$ac_ct_OBJDUMP" && break done - if test "x$ac_ct_NM" = x; then - NM="" + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="" else case $cross_compiling:$ac_tool_warned in yes:) @@ -38411,7 +38225,7 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - NM=$ac_ct_NM + OBJDUMP=$ac_ct_OBJDUMP fi fi @@ -38424,22 +38238,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$NM" + tool_specified="$OBJDUMP" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_NM+:} false; then : +if ${ac_cv_path_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else - case $NM in + case $OBJDUMP in [\\/]* | ?:[\\/]*) - ac_cv_path_NM="$NM" # Let the user override the test with a path. + ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -38449,7 +38263,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38460,29 +38274,29 @@ ;; esac fi -NM=$ac_cv_path_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +OBJDUMP=$ac_cv_path_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$NM" = x; then + if test "x$OBJDUMP" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5 -$as_echo_n "checking for NM... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5 +$as_echo_n "checking for OBJDUMP... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -38491,12 +38305,15 @@ fi + if test "x$OBJDUMP" != x; then + # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE + # bails if argument is missing. if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$NM" + complete="$OBJDUMP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -38532,14 +38349,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 fi fi @@ -38559,11 +38376,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -38610,7 +38427,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$NM" + complete="$OBJDUMP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -38655,14 +38472,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 fi fi @@ -38708,7 +38525,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$NM" + complete="$OBJDUMP" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -38727,20 +38544,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 fi fi @@ -38752,85 +38567,65 @@ fi if test "x$complete" != "x$new_complete"; then - NM="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;} + OBJDUMP="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} + fi + fi - GNM="$NM" + # Restore old path. + PATH="$OLD_PATH" + # Restore the flags to the user specified values. + # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" + CFLAGS="$ORG_CFLAGS" + CXXFLAGS="$ORG_CXXFLAGS" + OBJCFLAGS="$ORG_OBJCFLAGS" - # Publish this variable in the help. +# Finally do some processing after the detection phase - if test "x$STRIP" = x; then - # The variable is not set by user, try to locate tool using the code snippet - if test -n "$ac_tool_prefix"; then - for ac_prog in strip - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + if test "x$COMPILE_TYPE" = "xcross"; then + # Now we need to find a C/C++ compiler that can build executables for the + # build platform. We can't use the AC_PROG_CC macro, since it can only be + # used once. Also, we need to do this without adding a tools dir to the + # path, otherwise we might pick up cross-compilers which don't use standard + # naming. + + # FIXME: we should list the discovered compilers as an exclude pattern! + # If we do that, we can do this detection before POST_DETECTION, and still + # find the build compilers in the tools dir, if needed. -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + # Publish this variable in the help. - test -n "$STRIP" && break - done -fi -if test -z "$STRIP"; then - ac_ct_STRIP=$STRIP - for ac_prog in strip + + if test "x$BUILD_CC" = x; then + # The variable is not set by user, try to locate tool using the code snippet + for ac_prog in cl cc gcc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : +if ${ac_cv_path_BUILD_CC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $BUILD_CC in + [\\/]* | ?:[\\/]*) + ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="$ac_prog" + ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38838,112 +38633,57 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } +BUILD_CC=$ac_cv_path_BUILD_CC +if test -n "$BUILD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 +$as_echo "$BUILD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_STRIP" && break + test -n "$BUILD_CC" && break done - if test "x$ac_ct_STRIP" = x; then - STRIP="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -fi - else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !STRIP! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/} + # Try to remove the string !BUILD_CC! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xSTRIP" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;} + if test "xBUILD_CC" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - if test -n "$ac_tool_prefix"; then - for ac_prog in strip - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$STRIP" && break - done -fi -if test -z "$STRIP"; then - ac_ct_STRIP=$STRIP - for ac_prog in strip + for ac_prog in cl cc gcc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : +if ${ac_cv_path_BUILD_CC+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $BUILD_CC in + [\\/]* | ?:[\\/]*) + ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="$ac_prog" + ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -38951,34 +38691,22 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } +BUILD_CC=$ac_cv_path_BUILD_CC +if test -n "$BUILD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 +$as_echo "$BUILD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_STRIP" && break + test -n "$BUILD_CC" && break done - if test "x$ac_ct_STRIP" = x; then - STRIP="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -fi - else # If it succeeded, then it was overridden by the user. We will use it # for the tool. @@ -38988,22 +38716,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$STRIP" + tool_specified="$BUILD_CC" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_STRIP+:} false; then : +if ${ac_cv_path_BUILD_CC+:} false; then : $as_echo_n "(cached) " >&6 else - case $STRIP in + case $BUILD_CC in [\\/]* | ?:[\\/]*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. + ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -39013,7 +38741,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -39024,29 +38752,29 @@ ;; esac fi -STRIP=$ac_cv_path_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } +BUILD_CC=$ac_cv_path_BUILD_CC +if test -n "$BUILD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5 +$as_echo "$BUILD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$STRIP" = x; then + if test "x$BUILD_CC" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5 -$as_echo_n "checking for STRIP... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5 +$as_echo_n "checking for BUILD_CC... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -39060,7 +38788,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$STRIP" + complete="$BUILD_CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -39096,14 +38824,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 fi fi @@ -39123,11 +38851,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -39174,7 +38902,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$STRIP" + complete="$BUILD_CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -39219,14 +38947,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 fi fi @@ -39272,7 +39000,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$STRIP" + complete="$BUILD_CC" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -39291,20 +39019,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5 fi fi @@ -39316,88 +39042,40 @@ fi if test "x$complete" != "x$new_complete"; then - STRIP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;} - fi - + BUILD_CC="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;} fi - # objcopy is used for moving debug symbols to separate files when - # full debug symbols are enabled. - if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then # Publish this variable in the help. - if test "x$OBJCOPY" = x; then + if test "x$BUILD_CXX" = x; then # The variable is not set by user, try to locate tool using the code snippet - if test -n "$ac_tool_prefix"; then - for ac_prog in gobjcopy objcopy - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJCOPY+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJCOPY"; then - ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJCOPY=$ac_cv_prog_OBJCOPY -if test -n "$OBJCOPY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 -$as_echo "$OBJCOPY" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$OBJCOPY" && break - done -fi -if test -z "$OBJCOPY"; then - ac_ct_OBJCOPY=$OBJCOPY - for ac_prog in gobjcopy objcopy + for ac_prog in cl CC g++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : +if ${ac_cv_path_BUILD_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJCOPY"; then - ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $BUILD_CXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" + ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -39405,112 +39083,57 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY -if test -n "$ac_ct_OBJCOPY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 -$as_echo "$ac_ct_OBJCOPY" >&6; } +BUILD_CXX=$ac_cv_path_BUILD_CXX +if test -n "$BUILD_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 +$as_echo "$BUILD_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_OBJCOPY" && break + test -n "$BUILD_CXX" && break done - if test "x$ac_ct_OBJCOPY" = x; then - OBJCOPY="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJCOPY=$ac_ct_OBJCOPY - fi -fi - else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !OBJCOPY! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/} + # Try to remove the string !BUILD_CXX! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xOBJCOPY" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;} + if test "xBUILD_CXX" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - if test -n "$ac_tool_prefix"; then - for ac_prog in gobjcopy objcopy - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJCOPY+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJCOPY"; then - ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJCOPY=$ac_cv_prog_OBJCOPY -if test -n "$OBJCOPY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 -$as_echo "$OBJCOPY" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$OBJCOPY" && break - done -fi -if test -z "$OBJCOPY"; then - ac_ct_OBJCOPY=$OBJCOPY - for ac_prog in gobjcopy objcopy + for ac_prog in cl CC g++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then : +if ${ac_cv_path_BUILD_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJCOPY"; then - ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $BUILD_CXX in + [\\/]* | ?:[\\/]*) + ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJCOPY="$ac_prog" + ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -39518,34 +39141,22 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY -if test -n "$ac_ct_OBJCOPY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5 -$as_echo "$ac_ct_OBJCOPY" >&6; } +BUILD_CXX=$ac_cv_path_BUILD_CXX +if test -n "$BUILD_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 +$as_echo "$BUILD_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_OBJCOPY" && break + test -n "$BUILD_CXX" && break done - if test "x$ac_ct_OBJCOPY" = x; then - OBJCOPY="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJCOPY=$ac_ct_OBJCOPY - fi -fi - else # If it succeeded, then it was overridden by the user. We will use it # for the tool. @@ -39555,22 +39166,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$OBJCOPY" + tool_specified="$BUILD_CXX" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_OBJCOPY+:} false; then : +if ${ac_cv_path_BUILD_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - case $OBJCOPY in + case $BUILD_CXX in [\\/]* | ?:[\\/]*) - ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path. + ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -39580,7 +39191,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -39591,29 +39202,29 @@ ;; esac fi -OBJCOPY=$ac_cv_path_OBJCOPY -if test -n "$OBJCOPY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5 -$as_echo "$OBJCOPY" >&6; } +BUILD_CXX=$ac_cv_path_BUILD_CXX +if test -n "$BUILD_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5 +$as_echo "$BUILD_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$OBJCOPY" = x; then + if test "x$BUILD_CXX" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5 -$as_echo_n "checking for OBJCOPY... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5 +$as_echo_n "checking for BUILD_CXX... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -39622,14 +39233,12 @@ fi - # Only call fixup if objcopy was found. - if test -n "$OBJCOPY"; then if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$OBJCOPY" + complete="$BUILD_CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -39665,14 +39274,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 fi fi @@ -39692,11 +39301,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -39743,7 +39352,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$OBJCOPY" + complete="$BUILD_CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -39787,15 +39396,15 @@ new_path=`$WHICH "$new_path" 2> /dev/null` if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} + # It's still not found. Now this is an unrecoverable error. + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 fi fi @@ -39841,7 +39450,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$OBJCOPY" + complete="$BUILD_CXX" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -39860,20 +39469,18 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5 fi fi @@ -39885,12 +39492,9 @@ fi if test "x$complete" != "x$new_complete"; then - OBJCOPY="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;} - fi - - fi + BUILD_CXX="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;} fi @@ -39898,73 +39502,30 @@ # Publish this variable in the help. - if test "x$OBJDUMP" = x; then + if test "x$BUILD_LD" = x; then # The variable is not set by user, try to locate tool using the code snippet - if test -n "$ac_tool_prefix"; then - for ac_prog in gobjdump objdump - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$OBJDUMP" && break - done -fi -if test -z "$OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - for ac_prog in gobjdump objdump + for ac_prog in ld do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : +if ${ac_cv_path_BUILD_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $BUILD_LD in + [\\/]* | ?:[\\/]*) + ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" + ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -39972,112 +39533,57 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +BUILD_LD=$ac_cv_path_BUILD_LD +if test -n "$BUILD_LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 +$as_echo "$BUILD_LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_OBJDUMP" && break + test -n "$BUILD_LD" && break done - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -fi - else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !OBJDUMP! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/} + # Try to remove the string !BUILD_LD! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xOBJDUMP" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;} + if test "xBUILD_LD" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - if test -n "$ac_tool_prefix"; then - for ac_prog in gobjdump objdump - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$OBJDUMP" && break - done -fi -if test -z "$OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - for ac_prog in gobjdump objdump + for ac_prog in ld do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : +if ${ac_cv_path_BUILD_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $BUILD_LD in + [\\/]* | ?:[\\/]*) + ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_prog" + ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40085,34 +39591,22 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +BUILD_LD=$ac_cv_path_BUILD_LD +if test -n "$BUILD_LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 +$as_echo "$BUILD_LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$ac_ct_OBJDUMP" && break + test -n "$BUILD_LD" && break done - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - OBJDUMP=$ac_ct_OBJDUMP - fi -fi - else # If it succeeded, then it was overridden by the user. We will use it # for the tool. @@ -40122,22 +39616,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$OBJDUMP" + tool_specified="$BUILD_LD" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_OBJDUMP+:} false; then : +if ${ac_cv_path_BUILD_LD+:} false; then : $as_echo_n "(cached) " >&6 else - case $OBJDUMP in + case $BUILD_LD in [\\/]* | ?:[\\/]*) - ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path. + ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -40147,7 +39641,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40158,29 +39652,29 @@ ;; esac fi -OBJDUMP=$ac_cv_path_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } +BUILD_LD=$ac_cv_path_BUILD_LD +if test -n "$BUILD_LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5 +$as_echo "$BUILD_LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$OBJDUMP" = x; then + if test "x$BUILD_LD" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5 -$as_echo_n "checking for OBJDUMP... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5 +$as_echo_n "checking for BUILD_LD... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -40189,14 +39683,12 @@ fi - if test "x$OBJDUMP" != x; then - # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then # First separate the path from the arguments. This will split at the first # space. - complete="$OBJDUMP" + complete="$BUILD_LD" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -40232,14 +39724,14 @@ fi if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 fi fi @@ -40259,11 +39751,11 @@ elif test -f "${new_path}.cmd"; then input_to_shortpath="${new_path}.cmd" else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5 +$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 fi else input_to_shortpath="$new_path" @@ -40310,7 +39802,7 @@ # First separate the path from the arguments. This will split at the first # space. - complete="$OBJDUMP" + complete="$BUILD_LD" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -40355,14 +39847,14 @@ if test "x$new_path" = x; then # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 fi fi @@ -40408,7 +39900,7 @@ # We're on a posix platform. Hooray! :) # First separate the path from the arguments. This will split at the first # space. - complete="$OBJDUMP" + complete="$BUILD_LD" path="${complete%% *}" tmp="$complete EOL" arguments="${tmp#* }" @@ -40427,58 +39919,361 @@ done IFS="$IFS_save" else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;} new_path="$path" fi if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5 +$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;} has_space=`$ECHO "$complete" | $GREP " "` if test "x$has_space" != x; then { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} fi - as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5 + as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5 + fi + fi + + # Now join together the path and the arguments once again + if test "x$arguments" != xEOL; then + new_complete="$new_path ${arguments% *}" + else + new_complete="$new_path" + fi + + if test "x$complete" != "x$new_complete"; then + BUILD_LD="$new_complete" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5 +$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;} + fi + + else + # If we are not cross compiling, use the normal target compilers for + # building the build platform executables. + BUILD_CC="$CC" + BUILD_CXX="$CXX" + BUILD_LD="$LD" + fi + + + + + + + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # For hotspot, we need these in Windows mixed path, + # so rewrite them all. Need added .exe suffix. + HOTSPOT_CXX="$CXX.exe" + HOTSPOT_LD="$LD.exe" + HOTSPOT_MT="$MT.exe" + HOTSPOT_RC="$RC.exe" + + unix_path="$HOTSPOT_CXX" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + windows_path=`$CYGPATH -m "$unix_path"` + HOTSPOT_CXX="$windows_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + windows_path=`cmd //c echo $unix_path` + HOTSPOT_CXX="$windows_path" + fi + + + unix_path="$HOTSPOT_LD" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + windows_path=`$CYGPATH -m "$unix_path"` + HOTSPOT_LD="$windows_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + windows_path=`cmd //c echo $unix_path` + HOTSPOT_LD="$windows_path" + fi + + + unix_path="$HOTSPOT_MT" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + windows_path=`$CYGPATH -m "$unix_path"` + HOTSPOT_MT="$windows_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + windows_path=`cmd //c echo $unix_path` + HOTSPOT_MT="$windows_path" + fi + + + unix_path="$HOTSPOT_RC" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + windows_path=`$CYGPATH -m "$unix_path"` + HOTSPOT_RC="$windows_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + windows_path=`cmd //c echo $unix_path` + HOTSPOT_RC="$windows_path" + fi + + + + else + HOTSPOT_CXX="$CXX" + HOTSPOT_LD="$LD" + fi + + + + if test "x$TOOLCHAIN_TYPE" = xclang; then + USE_CLANG=true + fi + + + # LDEXE is the linker to use, when creating executables. Not really used. + # FIXME: These should just be removed! + LDEXE="$LD" + LDEXECXX="$LDCXX" + + + + + # The package path is used only on macosx? + # FIXME: clean this up, and/or move it elsewhere. + PACKAGE_PATH=/opt/local + + + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + # Setting these parameters makes it an error to link to macosx APIs that are + # newer than the given OS version and makes the linked binaries compatible + # even if built on a newer version of the OS. + # The expected format is X.Y.Z + MACOSX_VERSION_MIN=10.7.0 + + + # FIXME: This is used later on in our flag setup, but needs to be exported + # in spec.gmk due to closed legacy code. + # FIXME: clean this up, and/or move it elsewhere. + fi + + # 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'` + 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 + as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5 + fi + elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + if test "x$COMPILER_CPU_TEST" != "xx64"; then + as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5 + fi + fi + fi + + if test "x$TOOLCHAIN_TYPE" = xgcc; then + # If this is a --hash-style=gnu system, use --hash-style=both, why? + HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` + # This is later checked when setting flags. + fi + + # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed + # in executable.' + USING_BROKEN_SUSE_LD=no + if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5 +$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; } + echo "SUNWprivate_1.1 { local: *; };" > version-script.map + echo "int main() { }" > main.c + if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + USING_BROKEN_SUSE_LD=no + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + USING_BROKEN_SUSE_LD=yes + fi + rm -rf version-script.map main.c a.out + fi + + + +# Setup the JTReg Regression Test Harness. + + +# Check whether --with-jtreg was given. +if test "${with_jtreg+set}" = set; then : + withval=$with_jtreg; +else + with_jtreg=no +fi + + + if test "x$with_jtreg" = xno; then + # jtreg disabled + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 +$as_echo_n "checking for jtreg... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + if test "x$with_jtreg" != xyes; then + # with path specified. + JT_HOME="$with_jtreg" + fi + + if test "x$JT_HOME" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5 +$as_echo_n "checking for jtreg... " >&6; } + + # use JT_HOME enviroment var. + + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # Input might be given as Windows format, start by converting to + # unix format. + path="$JT_HOME" + new_path=`$CYGPATH -u "$path"` + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file precense. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5 + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-stile (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" fi fi - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" + + if test "x$path" != "x$new_path"; then + JT_HOME="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$JT_HOME" + has_colon=`$ECHO $path | $GREP ^.:` + new_path="$path" + if test "x$has_colon" = x; then + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $path` + fi + + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" fi - if test "x$complete" != "x$new_complete"; then - OBJDUMP="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;} + if test "x$path" != "x$new_path"; then + JT_HOME="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;} fi + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + + else + # We're on a posix platform. Hooray! :) + path="$JT_HOME" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 + fi + + # Use eval to expand a potential ~ + eval path="$path" + if test ! -f "$path" && test ! -d "$path"; then + as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + JT_HOME="`cd "$path"; $THEPWDCMD -L`" fi - if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then + + # jtreg win32 script works for everybody + JTREGEXE="$JT_HOME/win32/bin/jtreg" + + if test ! -f "$JTREGEXE"; then + as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 +$as_echo "$JTREGEXE" >&6; } + else + # try to find jtreg on path + # Publish this variable in the help. - if test "x$LIPO" = x; then + if test "x$JTREGEXE" = x; then # The variable is not set by user, try to locate tool using the code snippet - for ac_prog in lipo + for ac_prog in jtreg do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LIPO+:} false; then : +if ${ac_cv_path_JTREGEXE+:} false; then : $as_echo_n "(cached) " >&6 else - case $LIPO in + case $JTREGEXE in [\\/]* | ?:[\\/]*) - ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. + ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -40488,7 +40283,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40499,44 +40294,44 @@ ;; esac fi -LIPO=$ac_cv_path_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } +JTREGEXE=$ac_cv_path_JTREGEXE +if test -n "$JTREGEXE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 +$as_echo "$JTREGEXE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$LIPO" && break + test -n "$JTREGEXE" && break done else # The variable is set, but is it from the command line or the environment? - # Try to remove the string !LIPO! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/} + # Try to remove the string !JTREGEXE! from our list. + try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/} if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then # If it failed, the variable was not from the command line. Ignore it, # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xLIPO" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;} + if test "xJTREGEXE" != xBASH; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5 +$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;} fi # Try to locate tool using the code snippet - for ac_prog in lipo + for ac_prog in jtreg do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LIPO+:} false; then : +if ${ac_cv_path_JTREGEXE+:} false; then : $as_echo_n "(cached) " >&6 else - case $LIPO in + case $JTREGEXE in [\\/]* | ?:[\\/]*) - ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. + ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -40546,7 +40341,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40557,17 +40352,17 @@ ;; esac fi -LIPO=$ac_cv_path_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } +JTREGEXE=$ac_cv_path_JTREGEXE +if test -n "$JTREGEXE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 +$as_echo "$JTREGEXE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$LIPO" && break + test -n "$JTREGEXE" && break done else @@ -40579,22 +40374,22 @@ CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" # Check if the provided tool contains a complete path. - tool_specified="$LIPO" + tool_specified="$JTREGEXE" tool_basename="${tool_specified##*/}" if test "x$tool_basename" = "x$tool_specified"; then # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5 +$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;} # Extract the first word of "$tool_basename", so it can be a program name with args. set dummy $tool_basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_LIPO+:} false; then : +if ${ac_cv_path_JTREGEXE+:} false; then : $as_echo_n "(cached) " >&6 else - case $LIPO in + case $JTREGEXE in [\\/]* | ?:[\\/]*) - ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path. + ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -40604,7 +40399,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -40615,29 +40410,29 @@ ;; esac fi -LIPO=$ac_cv_path_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } +JTREGEXE=$ac_cv_path_JTREGEXE +if test -n "$JTREGEXE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5 +$as_echo "$JTREGEXE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$LIPO" = x; then + if test "x$JTREGEXE" = x; then as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 fi else # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5 -$as_echo_n "checking for LIPO... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5 +$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5 +$as_echo_n "checking for JTREGEXE... " >&6; } if test ! -x "$tool_specified"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } - as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5 + as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 $as_echo "$tool_specified" >&6; } @@ -40647,282 +40442,119 @@ - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$LIPO" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path=`$CYGPATH -u "$path"` - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path=`$CYGPATH -u "$path"` - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 - fi - fi - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file presence. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - # Short path failed, file does not exist as specified. - # Try adding .exe or .cmd - if test -f "${new_path}.exe"; then - input_to_shortpath="${new_path}.exe" - elif test -f "${new_path}.cmd"; then - input_to_shortpath="${new_path}.cmd" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 -$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 - fi - else - input_to_shortpath="$new_path" + if test "x$JTREGEXE" = x; then + as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5 fi - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. - new_path="$input_to_shortpath" - input_path="$input_to_shortpath" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-stile (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" + JT_HOME="`$DIRNAME $JTREGEXE`" fi fi - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" - fi - fi - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - # First separate the path from the arguments. This will split at the first - # space. - complete="$LIPO" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - # Input might be given as Windows format, start by converting to - # unix format. - new_path="$path" - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" + # Option used to tell the compiler whether to create 32- or 64-bit executables + if test "x$TOOLCHAIN_TYPE" = xxlc; then + COMPILER_TARGET_BITS_FLAG="-q" + else + COMPILER_TARGET_BITS_FLAG="-m" fi - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" + # We use AR from OS, not toolchain. Or maybe not. Actually, this is a bit messy. :-/ + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + ARFLAGS="-r" + elif test "x$OPENJDK_TARGET_OS" = xaix; then + ARFLAGS="-X64" + elif test "x$OPENJDK_TARGET_OS" = xwindows; then + # lib.exe is used as AR to create static libraries. + ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" + else + ARFLAGS="" fi - new_path=`$WHICH "$new_path" 2> /dev/null` + ## Setup strip. + # FIXME: should this really be per platform, or should it be per toolchain type? + # strip is not provided by clang or solstudio; so guessing platform makes most sense. + # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD. + if test "x$OPENJDK_TARGET_OS" = xlinux; then + STRIPFLAGS="-g" + elif test "x$OPENJDK_TARGET_OS" = xsolaris; then + STRIPFLAGS="-x" + elif test "x$OPENJDK_TARGET_OS" = xmacosx; then + STRIPFLAGS="-S" + elif test "x$OPENJDK_TARGET_OS" = xaix; then + STRIPFLAGS="-X32_64" + fi - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 - fi + if test "x$OPENJDK_TARGET_OS" != xwindows; then + POST_STRIP_CMD="$STRIP $STRIPFLAGS" fi - # Now new_path has a complete unix path to the binary - if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then - # Keep paths in /bin as-is, but remove trailing .exe if any - new_path="${new_path/%.exe/}" - # Do not save /bin paths to all_fixpath_prefixes! - else - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $new_path` - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + # FIXME: break out into MCSFLAGS + POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" fi - # Output is in $new_path - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + CC_OUT_OPTION=-Fo + EXE_OUT_OPTION=-out: + LD_OUT_OPTION=-out: + AR_OUT_OPTION=-out: + else + # The option used to specify the target .o,.a or .so file. + # When compiling, how to specify the to be created object file. + CC_OUT_OPTION='-o$(SPACE)' + # When linking, how to specify the to be created executable. + EXE_OUT_OPTION='-o$(SPACE)' + # When linking, how to specify the to be created dynamically linkable library. + LD_OUT_OPTION='-o$(SPACE)' + # When archiving, how to specify the to be create static archive for object files. + AR_OUT_OPTION='rcs$(SPACE)' fi - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") - fi - else - # We're on a posix platform. Hooray! :) - # First separate the path from the arguments. This will split at the first - # space. - complete="$LIPO" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - # Cannot rely on the command "which" here since it doesn't always work. - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test -z "$is_absolute_path"; then - # Path to executable is not absolute. Find it. - IFS_save="$IFS" - IFS=: - for p in $PATH; do - if test -f "$p/$path" && test -x "$p/$path"; then - new_path="$p/$path" - break - fi - done - IFS="$IFS_save" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;} - new_path="$path" - fi - if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 -$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5 + # On Windows, needs to set RC flags. + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + RC_FLAGS="-nologo -l 0x409 -r" + if test "x$VARIANT" = xOPT; then + RC_FLAGS="$RC_FLAGS -d NDEBUG" fi - fi - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" + # The version variables used to create RC_FLAGS may be overridden + # in a custom configure script, or possibly the command line. + # Let those variables be expanded at make time in spec.gmk. + # The \$ are escaped to the shell, and the $(...) variables + # are evaluated by make. + RC_FLAGS="$RC_FLAGS \ + -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \ + -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \ + -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ + -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \ + -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ + -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \ + -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\"" fi - if test "x$complete" != "x$new_complete"; then - LIPO="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;} - fi + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX. + CCXXFLAGS="$CCXXFLAGS -nologo" fi +# FIXME: Currently we must test this after toolchain but before flags. Fix! - # Restore old path without tools dir - PATH="$OLD_PATH" - - -# FIXME: Currently we must test this after paths but before flags. Fix! - -# And we can test some aspects on the target using configure macros. +# Now we can test some aspects on the target using configure macros. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 @@ -41489,114 +41121,59 @@ # Configure flags for the tools - ############################################################################### # # How to compile shared libraries. # - if test "x$GCC" = xyes; then - COMPILER_NAME=gcc + if test "x$TOOLCHAIN_TYPE" = xgcc; then PICFLAG="-fPIC" - LIBRARY_PREFIX=lib - SHARED_LIBRARY='lib$1.so' - STATIC_LIBRARY='lib$1.a' - SHARED_LIBRARY_FLAGS="-shared" - SHARED_LIBRARY_SUFFIX='.so' - STATIC_LIBRARY_SUFFIX='.a' - OBJ_SUFFIX='.o' - EXE_SUFFIX='' - SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' - SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' C_FLAG_REORDER='' CXX_FLAG_REORDER='' - SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1' - SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1' - LD="$CC" - LDEXE="$CC" - LDCXX="$CXX" - LDEXECXX="$CXX" - POST_STRIP_CMD="$STRIP -g" - # Linking is different on MacOSX if test "x$OPENJDK_TARGET_OS" = xmacosx; then - # Might change in the future to clang. - COMPILER_NAME=gcc - SHARED_LIBRARY='lib$1.dylib' + # Linking is different on MacOSX SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" - SHARED_LIBRARY_SUFFIX='.dylib' - EXE_SUFFIX='' + SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' + SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' SET_SHARED_LIBRARY_MAPFILE='' - SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' - SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" - POST_STRIP_CMD="$STRIP -S" - fi - else - if test "x$OPENJDK_TARGET_OS" = xsolaris; then - # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler - COMPILER_NAME=ossc - PICFLAG="-KPIC" - LIBRARY_PREFIX=lib - SHARED_LIBRARY='lib$1.so' - STATIC_LIBRARY='lib$1.a' - SHARED_LIBRARY_FLAGS="-G" - SHARED_LIBRARY_SUFFIX='.so' - STATIC_LIBRARY_SUFFIX='.a' - OBJ_SUFFIX='.o' - EXE_SUFFIX='' - SET_SHARED_LIBRARY_NAME='' - SET_SHARED_LIBRARY_MAPFILE='-M$1' - C_FLAG_REORDER='-xF' - CXX_FLAG_REORDER='-xF' - SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1' - SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" - CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" - CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" - CFLAGS_JDKLIB_EXTRA='-xstrconst' - POST_STRIP_CMD="$STRIP -x" - POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" - fi - if test "x$OPENJDK_TARGET_OS" = xaix; then - COMPILER_NAME=xlc - PICFLAG="-qpic=large" - LIBRARY_PREFIX=lib - SHARED_LIBRARY='lib$1.so' - STATIC_LIBRARY='lib$1.a' - SHARED_LIBRARY_FLAGS="-qmkshrobj" - SHARED_LIBRARY_SUFFIX='.so' - STATIC_LIBRARY_SUFFIX='.a' - OBJ_SUFFIX='.o' - EXE_SUFFIX='' - SET_SHARED_LIBRARY_NAME='' - SET_SHARED_LIBRARY_MAPFILE='' - C_FLAG_REORDER='' - CXX_FLAG_REORDER='' - SET_SHARED_LIBRARY_ORIGIN='' - SET_EXECUTABLE_ORIGIN="" - CFLAGS_JDK="" - CXXFLAGS_JDK="" - CFLAGS_JDKLIB_EXTRA='' - POST_STRIP_CMD="$STRIP -X32_64" - POST_MCS_CMD="" - fi - if test "x$OPENJDK_TARGET_OS" = xwindows; then - # If it is not gcc, then assume it is the MS Visual Studio compiler - COMPILER_NAME=cl - PICFLAG="" - LIBRARY_PREFIX= - SHARED_LIBRARY='$1.dll' - STATIC_LIBRARY='$1.lib' - SHARED_LIBRARY_FLAGS="-LD" - SHARED_LIBRARY_SUFFIX='.dll' - STATIC_LIBRARY_SUFFIX='.lib' - OBJ_SUFFIX='.obj' - EXE_SUFFIX='.exe' - SET_SHARED_LIBRARY_NAME='' - SET_SHARED_LIBRARY_MAPFILE='' - SET_SHARED_LIBRARY_ORIGIN='' - SET_EXECUTABLE_ORIGIN='' - fi + else + # Default works for linux, might work on other platforms as well. + SHARED_LIBRARY_FLAGS='-shared' + SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1' + SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN" + SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' + SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' + fi + elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then + # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler + PICFLAG="-KPIC" + C_FLAG_REORDER='-xF' + CXX_FLAG_REORDER='-xF' + SHARED_LIBRARY_FLAGS="-G" + SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1' + SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" + SET_SHARED_LIBRARY_NAME='' + SET_SHARED_LIBRARY_MAPFILE='-M$1' + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + PICFLAG="-qpic=large" + C_FLAG_REORDER='' + CXX_FLAG_REORDER='' + SHARED_LIBRARY_FLAGS="-qmkshrobj" + SET_EXECUTABLE_ORIGIN="" + SET_SHARED_LIBRARY_ORIGIN='' + SET_SHARED_LIBRARY_NAME='' + SET_SHARED_LIBRARY_MAPFILE='' + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + PICFLAG="" + C_FLAG_REORDER='' + CXX_FLAG_REORDER='' + SHARED_LIBRARY_FLAGS="-LD" + SET_EXECUTABLE_ORIGIN='' + SET_SHARED_LIBRARY_ORIGIN='' + SET_SHARED_LIBRARY_NAME='' + SET_SHARED_LIBRARY_MAPFILE='' fi @@ -41607,16 +41184,11 @@ - - - - - - - - - - + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" + CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" + CFLAGS_JDKLIB_EXTRA='-xstrconst' + fi # The (cross) compiler is now configured, we can now test capabilities # of the target platform. @@ -41628,181 +41200,102 @@ # and different operating systems. # - # - # NOTE: check for -mstackrealign needs to be below potential addition of -m32 - # - if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then - # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. - # While waiting for a better solution, the current workaround is to use -mstackrealign. - CFLAGS="$CFLAGS -mstackrealign" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5 -$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int main() { return 0; } -_ACEOF -if ac_fn_cxx_try_link "$LINENO"; then : - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -else - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5 - - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - - C_FLAG_DEPS="-MMD -MF" - CXX_FLAG_DEPS="-MMD -MF" - - case $COMPILER_TYPE in - CC ) - case $COMPILER_NAME in - gcc ) - case $OPENJDK_TARGET_OS in - macosx ) - # On MacOSX we optimize for size, something - # we should do for all platforms? - C_O_FLAG_HI="-Os" - C_O_FLAG_NORM="-Os" - C_O_FLAG_NONE="" - ;; - *) - C_O_FLAG_HI="-O3" - C_O_FLAG_NORM="-O2" - C_O_FLAG_NONE="-O0" - ;; - esac - CXX_O_FLAG_HI="$C_O_FLAG_HI" - CXX_O_FLAG_NORM="$C_O_FLAG_NORM" - CXX_O_FLAG_NONE="$C_O_FLAG_NONE" - CFLAGS_DEBUG_SYMBOLS="-g" - CXXFLAGS_DEBUG_SYMBOLS="-g" - if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then - CFLAGS_DEBUG_SYMBOLS="-g1" - CXXFLAGS_DEBUG_SYMBOLS="-g1" - fi - ;; - ossc ) - # - # Forte has different names for this with their C++ compiler... - # - C_FLAG_DEPS="-xMMD -xMF" - CXX_FLAG_DEPS="-xMMD -xMF" - - # Extra options used with HIGHEST - # - # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be - # done with care, there are some assumptions below that need to - # be understood about the use of pointers, and IEEE behavior. - # - # Use non-standard floating point mode (not IEEE 754) - CC_HIGHEST="$CC_HIGHEST -fns" - # Do some simplification of floating point arithmetic (not IEEE 754) - CC_HIGHEST="$CC_HIGHEST -fsimple" - # Use single precision floating point with 'float' - CC_HIGHEST="$CC_HIGHEST -fsingle" - # Assume memory references via basic pointer types do not alias - # (Source with excessing pointer casting and data access with mixed - # pointer types are not recommended) - CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" - # Use intrinsic or inline versions for math/std functions - # (If you expect perfect errno behavior, do not use this) - CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" - # Loop data dependency optimizations (need -xO3 or higher) - CC_HIGHEST="$CC_HIGHEST -xdepend" - # Pointer parameters to functions do not overlap - # (Similar to -xalias_level=basic usage, but less obvious sometimes. - # If you pass in multiple pointers to the same data, do not use this) - CC_HIGHEST="$CC_HIGHEST -xrestrict" - # Inline some library routines - # (If you expect perfect errno behavior, do not use this) - CC_HIGHEST="$CC_HIGHEST -xlibmil" - # Use optimized math routines - # (If you expect perfect errno behavior, do not use this) - # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now - #CC_HIGHEST="$CC_HIGHEST -xlibmopt" - - if test "x$OPENJDK_TARGET_CPU" = xsparc; then - CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" - CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" - fi - - case $OPENJDK_TARGET_CPU_ARCH in - x86) - C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" - C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" - C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" - C_O_FLAG_NONE="-xregs=no%frameptr" - CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" - CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" - CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" - CXX_O_FLAG_NONE="-xregs=no%frameptr" - if test "x$OPENJDK_TARGET_CPU" = xx86; then - C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" - CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" - fi - ;; - sparc) - CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" - CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" - C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" - C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" - C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" - C_O_FLAG_NONE="" - CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" - CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" - CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" - CXX_O_FLAG_NONE="" - ;; - esac - - CFLAGS_DEBUG_SYMBOLS="-g -xs" - CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" - ;; - xlc ) - C_FLAG_DEPS="-qmakedep=gcc -MF" - CXX_FLAG_DEPS="-qmakedep=gcc -MF" - C_O_FLAG_HIGHEST="-O3" - C_O_FLAG_HI="-O3 -qstrict" - C_O_FLAG_NORM="-O2" - C_O_FLAG_NONE="" - CXX_O_FLAG_HIGHEST="-O3" - CXX_O_FLAG_HI="-O3 -qstrict" - CXX_O_FLAG_NORM="-O2" - CXX_O_FLAG_NONE="" - CFLAGS_DEBUG_SYMBOLS="-g" - CXXFLAGS_DEBUG_SYMBOLS="-g" - LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall" - CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt" - CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt" - ;; - esac - ;; - CL ) + # FIXME: this was indirectly the old default, but just inherited. + # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + # C_FLAG_DEPS="-MMD -MF" + # fi + + # Generate make dependency files + if test "x$TOOLCHAIN_TYPE" = xgcc; then + C_FLAG_DEPS="-MMD -MF" + elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then + C_FLAG_DEPS="-xMMD -xMF" + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + C_FLAG_DEPS="-qmakedep=gcc -MF" + fi + CXX_FLAG_DEPS="$C_FLAG_DEPS" + + + + # Debug symbols + if test "x$TOOLCHAIN_TYPE" = xgcc; then + if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then + CFLAGS_DEBUG_SYMBOLS="-g1" + CXXFLAGS_DEBUG_SYMBOLS="-g1" + else + CFLAGS_DEBUG_SYMBOLS="-g" + CXXFLAGS_DEBUG_SYMBOLS="-g" + fi + elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then + CFLAGS_DEBUG_SYMBOLS="-g -xs" + CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + CFLAGS_DEBUG_SYMBOLS="-g" + CXXFLAGS_DEBUG_SYMBOLS="-g" + fi + + + + # Optimization levels + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then + CC_HIGHEST="$CC_HIGHEST -fns -fsimple-fsingle-xalias_level=basic-xbuiltin=%all-xdepend -xrestrict -xlibmil" + + if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then + # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global? + C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" + C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" + C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" + C_O_FLAG_NONE="-xregs=no%frameptr" + CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" + CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" + CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" + CXX_O_FLAG_NONE="-xregs=no%frameptr" + if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then + C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" + CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" + fi + elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then + C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" + C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" + C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" + C_O_FLAG_NONE="" + CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" + CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" + CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" + CXX_O_FLAG_NONE="" + fi + else + # The remaining toolchains share opt flags between CC and CXX; + # setup for C and duplicate afterwards. + if test "x$TOOLCHAIN_TYPE" = xgcc; then + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + # On MacOSX we optimize for size, something + # we should do for all platforms? + C_O_FLAG_HIGHEST="-Os" + C_O_FLAG_HI="-Os" + C_O_FLAG_NORM="-Os" + C_O_FLAG_NONE="" + else + C_O_FLAG_HIGHEST="-O3" + C_O_FLAG_HI="-O3" + C_O_FLAG_NORM="-O2" + C_O_FLAG_NONE="-O0" + fi + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + C_O_FLAG_HIGHEST="-O3" + C_O_FLAG_HI="-O3 -qstrict" + C_O_FLAG_NORM="-O2" + C_O_FLAG_NONE="" + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then C_O_FLAG_HIGHEST="-O2" C_O_FLAG_HI="-O1" C_O_FLAG_NORM="-O1" C_O_FLAG_NONE="-Od" - CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" - CXX_O_FLAG_HI="$C_O_FLAG_HI" - CXX_O_FLAG_NORM="$C_O_FLAG_NORM" - CXX_O_FLAG_NONE="$C_O_FLAG_NONE" - ;; - esac - - if test -z "$C_O_FLAG_HIGHEST"; then - C_O_FLAG_HIGHEST="$C_O_FLAG_HI" - fi - - if test -z "$CXX_O_FLAG_HIGHEST"; then - CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" + fi + CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" + CXX_O_FLAG_HI="$C_O_FLAG_HI" + CXX_O_FLAG_NORM="$C_O_FLAG_NORM" + CXX_O_FLAG_NONE="$C_O_FLAG_NONE" fi @@ -41815,8 +41308,17 @@ - - + # Special extras... + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then + if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then + CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" + CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" + fi + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall" + CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt" + CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt" + fi if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5 @@ -41872,62 +41374,48 @@ # Now setup the CFLAGS and LDFLAGS for the JDK build. # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. # - case $COMPILER_NAME in - gcc ) - CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ - -pipe \ - -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" - case $OPENJDK_TARGET_CPU_ARCH in - arm ) - # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing - CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" - ;; - ppc ) - # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing - ;; - * ) - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" - CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" - ;; - esac - ;; - ossc ) - CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" - case $OPENJDK_TARGET_CPU_ARCH in - x86 ) - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" - CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" - ;; - esac - CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" - CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" - - LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" - LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" - ;; - xlc ) - CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC" - CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC" - - LDFLAGS_JDK="$LDFLAGS_JDK" - LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK" - ;; - cl ) - CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ - -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ - -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ - -DWIN32 -DIAL" - case $OPENJDK_TARGET_CPU in - x86 ) - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" - ;; - x86_64 ) - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" - ;; - esac - ;; - esac + # Setup compiler/platform specific flags to CFLAGS_JDK, + # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?) + if test "x$TOOLCHAIN_TYPE" = xgcc; then + CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ + -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" + case $OPENJDK_TARGET_CPU_ARCH in + arm ) + # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing + CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" + ;; + ppc ) + # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing + ;; + * ) + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" + CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" + ;; + esac + elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then + CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" + if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" + CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" + fi + + CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" + CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" + elif test "x$TOOLCHAIN_TYPE" = xxlc; then + CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC" + CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC" + elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then + CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ + -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ + -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ + -DWIN32 -DIAL" + if test "x$OPENJDK_TARGET_CPU" = xx86_64; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" + else + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" + fi + fi ############################################################################### @@ -41953,12 +41441,13 @@ ;; esac + # Setup LP64 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" - # The package path is used only on macosx? - PACKAGE_PATH=/opt/local - + # Set some common defines. These works for all compilers, but assume + # -D is universally accepted. + # Setup endianness if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN @@ -41968,52 +41457,60 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" else - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" - fi - else - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" - fi - if test "x$OPENJDK_TARGET_OS" = xlinux; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" - fi - if test "x$OPENJDK_TARGET_OS" = xwindows; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" - fi - if test "x$OPENJDK_TARGET_OS" = xsolaris; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" - fi - if test "x$OPENJDK_TARGET_OS" = xaix; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64" - fi - if test "x$OPENJDK_TARGET_OS" = xmacosx; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" - # Setting these parameters makes it an error to link to macosx APIs that are - # newer than the given OS version and makes the linked binaries compatible even - # if built on a newer version of the OS. - # The expected format is X.Y.Z - MACOSX_VERSION_MIN=10.7.0 - - # The macro takes the version with no dots, ex: 1070 - # Let the flags variables get resolved in make for easier override on make - # command line. - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" - LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" - fi - if test "x$OPENJDK_TARGET_OS" = xbsd; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" + fi + else + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" fi + + # Setup target OS define. Use OS target name but in upper case. + OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR a-z A-Z` + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE" + + # Setup target CPU + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" + + # Setup debug/release defines if test "x$DEBUG_LEVEL" = xrelease; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" - if test "x$OPENJDK_TARGET_OS" = xsolaris; then - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" - fi + if test "x$OPENJDK_TARGET_OS" = xsolaris; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" + fi else CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" fi - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" + # Setup release name CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'" + + # Set some additional per-OS defines. + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" + elif test "x$OPENJDK_TARGET_OS" = xaix; then + # FIXME: PPC64 should not be here. + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64" + elif test "x$OPENJDK_TARGET_OS" = xbsd; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE" + fi + + # Additional macosx handling + if test "x$OPENJDK_TARGET_OS" = xmacosx; then + if test "x$TOOLCHAIN_TYPE" = xgcc; then + # Setting these parameters makes it an error to link to macosx APIs that are + # newer than the given OS version and makes the linked binaries compatible even + # if built on a newer version of the OS. + # The expected format is X.Y.Z + # This is set previously to e.g. MACOSX_VERSION_MIN=10.7.0 + # The macro takes the version with no dots, ex: 1070 + # Let the flags variables get resolved in make for easier override on make + # command line. + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" + LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" + fi + fi + + # Setup some hard coded includes CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ -I${JDK_OUTPUTDIR}/include \ -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ @@ -42030,6 +41527,13 @@ CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" + + + + + + # Setup LDFLAGS et al. + # # Now this is odd. The JDK native libraries have to link against libjvm.so # On 32-bit machines there is normally two distinct libjvm.so:s, client and server. # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library @@ -42038,9 +41542,9 @@ # libraries will link to whatever is in memory. Yuck. # # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. - if test "x$COMPILER_NAME" = xcl; then + if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" - if test "x$OPENJDK_TARGET_CPU" = xx86; then + if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" fi # TODO: make -debug optional "--disable-full-debug-symbols" @@ -42054,9 +41558,9 @@ fi LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" else - if test "x$COMPILER_NAME" = xgcc; then + if test "x$TOOLCHAIN_TYPE" = xgcc; then # If this is a --hash-style=gnu system, use --hash-style=both, why? - HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` + # We have previously set HAS_GNU_HASH if this is the case if test -n "$HAS_GNU_HASH"; then LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " fi @@ -42071,6 +41575,12 @@ fi fi fi + + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then + LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" + LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" + fi + LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" @@ -42089,7 +41599,7 @@ fi LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" - if test "x$COMPILER_NAME" = xossc; then + if test "x$TOOLCHAIN_TYPE" = xsolstudio; then LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" fi @@ -42106,13 +41616,6 @@ - - - - - - - # Some Zero and Shark settings. # ZERO_ARCHFLAG tells the compiler which mode to build for case "${OPENJDK_TARGET_CPU}" in @@ -42259,27 +41762,6 @@ - # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.' - USING_BROKEN_SUSE_LD=no - if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5 -$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; } - echo "SUNWprivate_1.1 { local: *; };" > version-script.map - echo "int main() { }" > main.c - if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - USING_BROKEN_SUSE_LD=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - USING_BROKEN_SUSE_LD=yes - fi - rm -rf version-script.map main.c a.out - fi - - - # Setup debug symbols (need objcopy from the toolchain for that) # @@ -42345,8 +41827,6 @@ - - ############################################################################### # # Check dependencies for external and internal libraries. @@ -47772,18 +47252,469 @@ fi # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) - if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then + if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" fi # TODO better (platform agnostic) test - if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then + if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIn_TYPE" = xgcc; then LIBCXX="-lstdc++" fi + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then + + +# Check whether --with-msvcr-dll was given. +if test "${with_msvcr_dll+set}" = set; then : + withval=$with_msvcr_dll; +fi + + + if test "x$with_msvcr_dll" != x; then + # If given explicitely by user, do not probe. If not present, fail directly. + + POSSIBLE_MSVCR_DLL="$with_msvcr_dll" + METHOD="--with-msvcr-dll" + if test -e "$POSSIBLE_MSVCR_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 +$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 +$as_echo_n "checking found msvcr100.dll architecture... " >&6; } + MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 +$as_echo "$MSVCR_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + fi + fi + + if test "x$MSVCR_DLL" = x; then + as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5 + fi + fi + + if test "x$MSVCR_DLL" = x; then + # Probe: Using well-known location from Visual Studio 10.0 + if test "x$VCINSTALLDIR" != x; then + CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR" + + windows_path="$CYGWIN_VC_INSTALL_DIR" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + CYGWIN_VC_INSTALL_DIR="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + CYGWIN_VC_INSTALL_DIR="$unix_path" + fi + + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll" + else + POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll" + fi + + POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + METHOD="well-known location in VCINSTALLDIR" + if test -e "$POSSIBLE_MSVCR_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 +$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 +$as_echo_n "checking found msvcr100.dll architecture... " >&6; } + MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 +$as_echo "$MSVCR_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + fi + fi + + fi + fi + + if test "x$MSVCR_DLL" = x; then + # Probe: Check in the Boot JDK directory. + POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll" + + POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + METHOD="well-known location in Boot JDK" + if test -e "$POSSIBLE_MSVCR_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 +$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 +$as_echo_n "checking found msvcr100.dll architecture... " >&6; } + MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 +$as_echo "$MSVCR_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + fi + fi + + fi + + if test "x$MSVCR_DLL" = x; then + # Probe: Look in the Windows system32 directory + CYGWIN_SYSTEMROOT="$SYSTEMROOT" + + windows_path="$CYGWIN_SYSTEMROOT" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + CYGWIN_SYSTEMROOT="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + CYGWIN_SYSTEMROOT="$unix_path" + fi + + POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll" + + POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + METHOD="well-known location in SYSTEMROOT" + if test -e "$POSSIBLE_MSVCR_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 +$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 +$as_echo_n "checking found msvcr100.dll architecture... " >&6; } + MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 +$as_echo "$MSVCR_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + fi + fi + + fi + + if test "x$MSVCR_DLL" = x; then + # Probe: If Visual Studio Express is installed, there is usually one with the debugger + if test "x$VS100COMNTOOLS" != x; then + CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.." + + windows_path="$CYGWIN_VS_TOOLS_DIR" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + CYGWIN_VS_TOOLS_DIR="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + CYGWIN_VS_TOOLS_DIR="$unix_path" + fi + + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1` + else + POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1` + fi + + POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + METHOD="search of VS100COMNTOOLS" + if test -e "$POSSIBLE_MSVCR_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 +$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 +$as_echo_n "checking found msvcr100.dll architecture... " >&6; } + MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 +$as_echo "$MSVCR_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + fi + fi + + fi + fi + + if test "x$MSVCR_DLL" = x; then + # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now. + # (This was the original behaviour; kept since it might turn up something) + if test "x$CYGWIN_VC_INSTALL_DIR" != x; then + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1` + else + POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1` + if test "x$POSSIBLE_MSVCR_DLL" = x; then + # We're grasping at straws now... + POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1` + fi + fi + + + POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + METHOD="search of VCINSTALLDIR" + if test -e "$POSSIBLE_MSVCR_DLL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5 +$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;} + + # Need to check if the found msvcr is correct architecture + { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5 +$as_echo_n "checking found msvcr100.dll architecture... " >&6; } + MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"` + if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then + CORRECT_MSVCR_ARCH=386 + else + CORRECT_MSVCR_ARCH=x86-64 + fi + if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + MSVCR_DLL="$POSSIBLE_MSVCR_DLL" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5 +$as_echo "$MSVCR_DLL" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5 +$as_echo "incorrect, ignoring" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5 +$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;} + fi + fi + + fi + fi + + if test "x$MSVCR_DLL" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5 +$as_echo_n "checking for msvcr100.dll... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5 + fi + + + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + + # Input might be given as Windows format, start by converting to + # unix format. + path="$MSVCR_DLL" + new_path=`$CYGPATH -u "$path"` + + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then + # "foo.exe" is OK but "foo" is an error. + # + # This test is therefore slightly more accurate than "test -f" to check for file precense. + # It is also a way to make sure we got the proper file name for the real test later on. + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` + if test "x$test_shortpath" = x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5 + fi + + # Call helper function which possibly converts this using DOS-style short mode. + # If so, the updated path is stored in $new_path. + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + shortmode_path=`$CYGPATH -s -m -a "$input_path"` + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then + # Going to short mode and back again did indeed matter. Since short mode is + # case insensitive, let's make it lowercase to improve readability. + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Now convert it back to Unix-stile (cygpath) + input_path=`$CYGPATH -u "$shortmode_path"` + new_path="$input_path" + fi + fi + + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` + if test "x$test_cygdrive_prefix" = x; then + # As a simple fix, exclude /usr/bin since it's not a real path. + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then + # The path is in a Cygwin special directory (e.g. /home). We need this converted to + # a path prefixed by /cygdrive for fixpath to work. + new_path="$CYGWIN_ROOT_PATH$input_path" + fi + fi + + + if test "x$path" != "x$new_path"; then + MSVCR_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} + fi + + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + + path="$MSVCR_DLL" + has_colon=`$ECHO $path | $GREP ^.:` + new_path="$path" + if test "x$has_colon" = x; then + # Not in mixed or Windows style, start by that. + new_path=`cmd //c echo $path` + fi + + + input_path="$new_path" + # Check if we need to convert this using DOS-style short mode. If the path + # contains just simple characters, use it. Otherwise (spaces, weird characters), + # take no chances and rewrite it. + # Note: m4 eats our [], so we need to use [ and ] instead. + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` + if test "x$has_forbidden_chars" != x; then + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + fi + + + windows_path="$new_path" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + new_path="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + new_path="$unix_path" + fi + + if test "x$path" != "x$new_path"; then + MSVCR_DLL="$new_path" + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5 +$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;} + fi + + # Save the first 10 bytes of this path to the storage, so fixpath can work. + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") + + else + # We're on a posix platform. Hooray! :) + path="$MSVCR_DLL" + has_space=`$ECHO "$path" | $GREP " "` + if test "x$has_space" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5 +$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;} + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 + fi + + # Use eval to expand a potential ~ + eval path="$path" + if test ! -f "$path" && test ! -d "$path"; then + as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5 + fi + + MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`" + fi + + + + +# Check whether --with-dxsdk was given. +if test "${with_dxsdk+set}" = set; then : + withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5 +$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;} +fi + + + + +# Check whether --with-dxsdk-lib was given. +if test "${with_dxsdk_lib+set}" = set; then : + withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5 +$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;} +fi + + + + +# Check whether --with-dxsdk-include was given. +if test "${with_dxsdk_include+set}" = set; then : + withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5 +$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;} +fi + + + fi + + ############################################################################### # @@ -48211,7 +48142,7 @@ if test "x$ENABLE_PRECOMPH" = xyes; then # Check that the compiler actually supports precomp headers. - if test "x$GCC" = xyes; then + if test "x$TOOLCHAIN_TYPE" = xgcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5 $as_echo_n "checking that precompiled headers work... " >&6; } echo "int alfa();" > conftest.h @@ -49931,8 +49862,9 @@ printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" fi printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" - printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" - printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" + printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n" + printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n" + printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n" printf "\n" printf "Build performance summary:\n"