8210423: Backport of 8034788 breaks GCC version detection

Thu, 06 Sep 2018 15:15:38 +0100

author
aph
date
Thu, 06 Sep 2018 15:15:38 +0100
changeset 2321
519c5b16a52a
parent 2320
499617980681
child 2322
801559b2d34e

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 Aug 29 09:23:15 2018 -0700
     1.2 +++ b/common/autoconf/generated-configure.sh	Thu Sep 06 15:15:38 2018 +0100
     1.3 @@ -29879,25 +29879,25 @@
     1.4  
     1.5  
     1.6  
     1.7 -  if test "x$CC_VERSION" != "x$CXX_VERSION"; then
     1.8 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&5
     1.9 -$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&2;}
    1.10 +  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
    1.11 +    { $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.12 +$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
    1.13      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
    1.14  $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
    1.15    fi
    1.16  
    1.17 -  # We only check CC_VERSION since we assume CXX_VERSION is equal.
    1.18 -  if  [[ "$CC_VERSION" =~ (.*\.){3} ]] ; then
    1.19 +  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
    1.20 +  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
    1.21      { $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.22  $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.23    fi
    1.24  
    1.25 -  if  [[  "$CC_VERSION" =~ [0-9]{6} ]] ; then
    1.26 +  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
    1.27      { $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.28  $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
    1.29    fi
    1.30  
    1.31 -  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION"`
    1.32 +  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
    1.33  
    1.34  
    1.35    #
     2.1 --- a/common/autoconf/toolchain.m4	Wed Aug 29 09:23:15 2018 -0700
     2.2 +++ b/common/autoconf/toolchain.m4	Thu Sep 06 15:15:38 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