File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,11 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
449449 # Copyright (C) 2013 Free Software Foundation, Inc.
450450 # This is free software; see the source for copying conditions. There is NO
451451 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
452+ # or look like
453+ # gcc (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)
454+ # Copyright (C) 2020 Free Software Foundation, Inc.
455+ # This is free software; see the source for copying conditions. There is NO
456+ # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
452457 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
453458 # Check that this is likely to be GCC.
454459 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
@@ -462,7 +467,8 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
462467 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
463468 $SED -e 's/ *Copyright .*//'`
464469 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
465- $SED -e 's/^.* \(@<:@ 1-9@:>@ <:@0-9@:>@ *\.@<:@ 0-9.@:>@ *\)@<:@ ^0-9.@:>@ .*$/\1/'`
470+ $AWK -F ')' '{print [ $] 2}' | \
471+ $AWK '{print [ $] 1}'`
466472 elif test "x$TOOLCHAIN_TYPE" = xclang; then
467473 # clang --version output typically looks like
468474 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
You can’t perform that action at this time.
0 commit comments