提交 966a7539 编写于 作者: R Richard Levitte

Update the recognision of GCC version numbers to handle the prefix text

that GCC 3.1 adds to the --version output
上级 0f829bd1
...@@ -390,11 +390,13 @@ exit 0 ...@@ -390,11 +390,13 @@ exit 0
# figure out if gcc is available and if so we use it otherwise # figure out if gcc is available and if so we use it otherwise
# we fallback to whatever cc does on the system # we fallback to whatever cc does on the system
GCCVER=`(gcc --version) 2>/dev/null` GCCVER=`(gcc --version) 2>/dev/null | head -1`
if [ "$GCCVER" != "" ]; then if [ "$GCCVER" != "" ]; then
CC=gcc CC=gcc
# then strip off whatever prefix Cygnus prepends the number with... # then strip off whatever prefix Cygnus as well as GCC 3.1 prepends
GCCVER=`echo $GCCVER | sed 's/^[a-z]*\-//'` # the number with... Hopefully, this will work for any future prefixes
# as well.
GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z ()]*\-//'`
# peak single digit before and after first dot, e.g. 2.95.1 gives 29 # peak single digit before and after first dot, e.g. 2.95.1 gives 29
GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册