forked from aniani/vim
updated for version 7.4.048
Problem: Recent clang version complains about -fno-strength-reduce. Solution: Add a configure check for the clang version. (Kazunobu Kuriyama)
This commit is contained in:
18
src/auto/configure
vendored
18
src/auto/configure
vendored
@@ -3989,6 +3989,24 @@ if test "$GCC" = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recent clang version" >&5
|
||||
$as_echo_n "checking for recent clang version... " >&6; }
|
||||
CLANG_VERSION_STRING=`"$CC" --version 2>/dev/null | sed -n -e 's/^.*clang.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
|
||||
if test x"$CLANG_VERSION_STRING" != x"" ; then
|
||||
CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
|
||||
CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
|
||||
CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
|
||||
CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
|
||||
$as_echo "$CLANG_VERSION" >&6; }
|
||||
if test "$CLANG_VERSION" -ge 500002075 ; then
|
||||
CFLAGS=`echo "$CFLAGS" | sed -n -e 's/-fno-strength-reduce/ /p'`
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
|
||||
$as_echo "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
|
||||
|
||||
Reference in New Issue
Block a user