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 @@ -358,6 +358,11 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
358358 # Copyright (C) 2013 Free Software Foundation, Inc.
359359 # This is free software; see the source for copying conditions. There is NO
360360 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
361+ # or look like
362+ # gcc (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)
363+ # Copyright (C) 2020 Free Software Foundation, Inc.
364+ # This is free software; see the source for copying conditions. There is NO
365+ # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
361366 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
362367 # Check that this is likely to be GCC.
363368 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
@@ -371,7 +376,8 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
371376 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
372377 $SED -e 's/ *Copyright .*//'`
373378 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
374- $SED -e 's/^.* \(@<:@ 1-9@:>@ <:@0-9@:>@ *\.@<:@ 0-9.@:>@ *\)@<:@ ^0-9.@:>@ .*$/\1/'`
379+ $AWK -F ')' '{print [ $] 2}' | \
380+ $AWK '{print [ $] 1}'`
375381 elif test "x$TOOLCHAIN_TYPE" = xclang; then
376382 # clang --version output typically looks like
377383 # Apple clang version 15.0.0 (clang-1500.3.9.4)
You can’t perform that action at this time.
0 commit comments