Use the -dumpversion option to llvm-gcc which gives us just the version #

and is unlikely to change in future releases. This also simplifies the
parsing of the full and major llvm-gcc version numbers in the script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2006-05-09 00:31:01 +00:00
parent e7fd553b3b
commit b5d75b8618
2 changed files with 2 additions and 2 deletions

View File

@ -619,7 +619,7 @@ if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then
AC_SUBST(LLVMCC1PLUS,$llvmcc1pluspath)
llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
AC_SUBST(LLVMGCCDIR,$llvmgccdir)
llvmgccversion=[`"$LLVMGCC" -v 2>&1 | grep '^gcc version' | sed 's/^gcc version \([0-9.]*\).*/\1/'`]
llvmgccversion=[`"$LLVMGCC" -dumpversion 2>&1 | sed 's/^\([0-9.]*\).*/\1/'`]
llvmgccmajvers=[`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`]
AC_SUBST(LLVMGCC_VERSION,$llvmgccversion)
AC_SUBST(LLVMGCC_MAJVERS,$llvmgccmajvers)

2
configure vendored
View File

@ -30725,7 +30725,7 @@ if test "$llvm_cv_llvmgcc_sanity" = "yes" ; then
llvmgccdir=`echo "$llvmcc1path" | sed 's,/libexec/.*,,'`
LLVMGCCDIR=$llvmgccdir
llvmgccversion=`"$LLVMGCC" -v 2>&1 | grep '^gcc version' | sed 's/^gcc version \([0-9.]*\).*/\1/'`
llvmgccversion=`"$LLVMGCC" -dumpversion 2>&1 | sed 's/^\([0-9.]*\).*/\1/'`
llvmgccmajvers=`echo $llvmgccversion | sed 's/^\([0-9]\).*/\1/'`
LLVMGCC_VERSION=$llvmgccversion