8210423: Backport of 8034788 breaks GCC version detection jdk8u192-b10

Wed, 12 Sep 2018 16:13:34 +0100

author
aph
date
Wed, 12 Sep 2018 16:13:34 +0100
changeset 2306
15cc8dfafe99
parent 2305
52205d862c41
child 2307
3dd937ad0c55

8210423: Backport of 8034788 breaks GCC version detection
Reviewed-by: erikj

common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
common/autoconf/toolchain.m4 file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/generated-configure.sh	Wed Sep 12 17:28:01 2018 +0100
     1.2 +++ b/common/autoconf/generated-configure.sh	Wed Sep 12 16:13:34 2018 +0100
     1.3 @@ -4336,7 +4336,7 @@
     1.4  #CUSTOM_AUTOCONF_INCLUDE
     1.5  
     1.6  # Do not change or remove the following line, it is needed for consistency checks:
     1.7 -DATE_WHEN_GENERATED=1536078152
     1.8 +DATE_WHEN_GENERATED=1536764960
     1.9  
    1.10  ###############################################################################
    1.11  #
    1.12 @@ -29879,25 +29879,25 @@
    1.13  
    1.14  
    1.15  
    1.16 -  if test "x$CC_VERSION" != "x$CXX_VERSION"; then
    1.17 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&5
    1.18 -$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&2;}
    1.19 +  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
    1.20 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
    1.21 +$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
    1.22      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
    1.23  $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
    1.24    fi
    1.25  
    1.26 -  # We only check CC_VERSION since we assume CXX_VERSION is equal.
    1.27 -  if  [[ "$CC_VERSION" =~ (.*\.){3} ]] ; then
    1.28 +  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
    1.29 +  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
    1.30      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
    1.31  $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
    1.32    fi
    1.33  
    1.34 -  if  [[  "$CC_VERSION" =~ [0-9]{6} ]] ; then
    1.35 +  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
    1.36      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
    1.37  $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
    1.38    fi
    1.39  
    1.40 -  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION"`
    1.41 +  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
    1.42  
    1.43  
    1.44    #
     2.1 --- a/common/autoconf/toolchain.m4	Wed Sep 12 17:28:01 2018 +0100
     2.2 +++ b/common/autoconf/toolchain.m4	Wed Sep 12 16:13:34 2018 +0100
     2.3 @@ -56,21 +56,21 @@
     2.4  # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
     2.5  AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
     2.6  [
     2.7 -  if test "x$CC_VERSION" != "x$CXX_VERSION"; then
     2.8 -    AC_MSG_WARN([C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION.])
     2.9 +  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
    2.10 +    AC_MSG_WARN([C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER.])
    2.11      AC_MSG_WARN([This typically indicates a broken setup, and is not supported])
    2.12    fi
    2.13  
    2.14 -  # We only check CC_VERSION since we assume CXX_VERSION is equal.
    2.15 -  if [ [[ "$CC_VERSION" =~ (.*\.){3} ]] ]; then
    2.16 +  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
    2.17 +  if [ [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ]; then
    2.18      AC_MSG_WARN([C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong.])
    2.19    fi
    2.20  
    2.21 -  if [ [[  "$CC_VERSION" =~ [0-9]{6} ]] ]; then
    2.22 +  if [ [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ]; then
    2.23      AC_MSG_WARN([C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong.])
    2.24    fi
    2.25  
    2.26 -  $2COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$CC_VERSION"`
    2.27 +  $2COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$CC_VERSION_NUMBER"`
    2.28  ])
    2.29  
    2.30  # Check if the configured compiler (C and C++) is of a specific version or

mercurial