]> granicus.if.org Git - vim/commitdiff
patch 8.2.2431: warning for -fno-strength-reduce with Clang 11 v8.2.2431
authorBram Moolenaar <Bram@vim.org>
Sat, 30 Jan 2021 18:33:36 +0000 (19:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 30 Jan 2021 18:33:36 +0000 (19:33 +0100)
Problem:    Warning for -fno-strength-reduce with Clang 11.
Solution:   Adjust check for clang version number.

src/auto/configure
src/configure.ac
src/version.c

index bbfaafcad469a8bb6e72802d49471624d8b4981a..9d76f89088cf18d3261cd581a745cc71ce37953d 100755 (executable)
@@ -4510,9 +4510,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
   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; }
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
 $as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
-  if test "$CLANG_VERSION" -ge 500002075 ; then
+  if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
     CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
index fe2a40134200fe4e2ef2119627b502a2d64a5aaf..e511b35082da6d5fcc4b35666e0ed55649fc5285 100644 (file)
@@ -127,8 +127,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
   dnl change the constant 500002075 below appropriately.  To get the
   dnl integer corresponding to a version number, refer to the
   dnl definition of CLANG_VERSION above.
+  dnl Clang 11 reports "11", assume Clang 10 and later work like this.
   AC_MSG_CHECKING(if clang supports -fno-strength-reduce)
-  if test "$CLANG_VERSION" -ge 500002075 ; then
+  if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
     AC_MSG_RESULT(no)
     CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
   else
index 56a0797562144988f40d8d8c18327a17fe6b4f2f..6854c10fd5d96e94578fea7945a576e678d74d24 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2431,
 /**/
     2430,
 /**/