33 ########################################################################
34
35 m4_include([toolchain_windows.m4])
36
37 # All valid toolchains, regardless of platform (used by help.m4)
38 VALID_TOOLCHAINS_all="gcc clang xlc microsoft"
39
40 # These toolchains are valid on different platforms
41 VALID_TOOLCHAINS_linux="gcc clang"
42 VALID_TOOLCHAINS_macosx="gcc clang"
43 VALID_TOOLCHAINS_aix="xlc"
44 VALID_TOOLCHAINS_windows="microsoft"
45
46 # Toolchain descriptions
47 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
48 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
49 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
50 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
51
52 # Minimum supported versions, empty means unspecified
53 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
54 TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
55 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
56 TOOLCHAIN_MINIMUM_VERSION_xlc=""
57
58 # Minimum supported linker versions, empty means unspecified
59 TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.18"
60
61 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
62 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
63 # $1 - optional variable prefix for compiler and version variables (BUILD_)
64 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
65 # $3 - optional human readable description for the type of compilers ("build " or "")
66 AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
67 [
68 if test "x[$]$1CC_VERSION_NUMBER" != "x[$]$1CXX_VERSION_NUMBER"; then
69 AC_MSG_WARN([The $3C and C++ compilers have different version numbers, [$]$1CC_VERSION_NUMBER vs [$]$1CXX_VERSION_NUMBER.])
70 AC_MSG_WARN([This typically indicates a broken setup, and is not supported])
71 fi
72
73 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
74 if [ [[ "[$]$1CC_VERSION_NUMBER" =~ (.*\.){4} ]] ]; then
75 AC_MSG_WARN([C compiler version number has more than four parts (W.X.Y.Z): [$]$1CC_VERSION_NUMBER. Comparisons might be wrong.])
|
33 ########################################################################
34
35 m4_include([toolchain_windows.m4])
36
37 # All valid toolchains, regardless of platform (used by help.m4)
38 VALID_TOOLCHAINS_all="gcc clang xlc microsoft"
39
40 # These toolchains are valid on different platforms
41 VALID_TOOLCHAINS_linux="gcc clang"
42 VALID_TOOLCHAINS_macosx="gcc clang"
43 VALID_TOOLCHAINS_aix="xlc"
44 VALID_TOOLCHAINS_windows="microsoft"
45
46 # Toolchain descriptions
47 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
48 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
49 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
50 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
51
52 # Minimum supported versions, empty means unspecified
53 TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
54 TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
55 TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
56 TOOLCHAIN_MINIMUM_VERSION_xlc=""
57
58 # Minimum supported linker versions, empty means unspecified
59 TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.18"
60
61 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
62 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
63 # $1 - optional variable prefix for compiler and version variables (BUILD_)
64 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
65 # $3 - optional human readable description for the type of compilers ("build " or "")
66 AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
67 [
68 if test "x[$]$1CC_VERSION_NUMBER" != "x[$]$1CXX_VERSION_NUMBER"; then
69 AC_MSG_WARN([The $3C and C++ compilers have different version numbers, [$]$1CC_VERSION_NUMBER vs [$]$1CXX_VERSION_NUMBER.])
70 AC_MSG_WARN([This typically indicates a broken setup, and is not supported])
71 fi
72
73 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
74 if [ [[ "[$]$1CC_VERSION_NUMBER" =~ (.*\.){4} ]] ]; then
75 AC_MSG_WARN([C compiler version number has more than four parts (W.X.Y.Z): [$]$1CC_VERSION_NUMBER. Comparisons might be wrong.])
|