--- a/gcc/configure 2017-07-01 14:49:57.209440088 +0200 +++ b/gcc/configure 2017-07-01 15:17:58.873173992 +0200 @@ -7345,11 +7345,11 @@ # the assembler. Perhaps it's better to figure out whether # arbitrary sections are supported and try the test. as_ver=`$gcc_cv_as --version 2>/dev/null | head -n 1` - if echo "$as_ver" | grep GNU > /dev/null; then - as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'` - as_major=`echo $as_ver | sed 's/\..*//'` - as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'` - if test $as_major -eq 2 -a $as_minor -lt 11; then + if echo "$as_ver" | grep -q GNU; then + if echo "${as_ver##* }" | { + IFS=. read -r as_major as_minor _ + test "$as_major" -eq 2 -a "$as_minor" -lt 11 + } then gcc_cv_as_leb128="no" fi fi