Skip to content
Snippets Groups Projects
Commit 48f0fa31 authored by SendaoYan's avatar SendaoYan Committed by Martin Doerr
Browse files

8341806: Gcc version detection failure on Alinux3

Backport-of: 50133608f988fcfb2cca8f5a978722575f8d4849
parent 94eaaa81
No related branches found
No related tags found
No related merge requests found
...@@ -429,6 +429,11 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], ...@@ -429,6 +429,11 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
# Copyright (C) 2013 Free Software Foundation, Inc. # Copyright (C) 2013 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO # This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# or look like
# gcc (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)
# Copyright (C) 2020 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` COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
# Check that this is likely to be GCC. # Check that this is likely to be GCC.
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
...@@ -442,7 +447,8 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], ...@@ -442,7 +447,8 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \ COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/ *Copyright .*//'` $SED -e 's/ *Copyright .*//'`
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/^.* \(@<:@1-9@:>@<:@0-9@:>@*\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'` $AWK -F ')' '{print [$]2}' | \
$AWK '{print [$]1}'`
elif test "x$TOOLCHAIN_TYPE" = xclang; then elif test "x$TOOLCHAIN_TYPE" = xclang; then
# clang --version output typically looks like # clang --version output typically looks like
# Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn) # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment