Skip to content

Commit ebd211c

Browse files
committed
patch 8.2.2431: warning for -fno-strength-reduce with Clang 11
Problem: Warning for -fno-strength-reduce with Clang 11. Solution: Adjust check for clang version number.
1 parent f8c6a17 commit ebd211c

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/auto/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4510,9 +4510,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
45104510
CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
45114511
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
45124512
$as_echo "$CLANG_VERSION" >&6; }
4513-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4513+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
45144514
$as_echo_n "checking if clang supports -fno-strength-reduce... " >&6; }
4515-
if test "$CLANG_VERSION" -ge 500002075 ; then
4515+
if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
45164516
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45174517
$as_echo "no" >&6; }
45184518
CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`

src/configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ if test x"$CLANG_VERSION_STRING" != x"" ; then
127127
dnl change the constant 500002075 below appropriately. To get the
128128
dnl integer corresponding to a version number, refer to the
129129
dnl definition of CLANG_VERSION above.
130+
dnl Clang 11 reports "11", assume Clang 10 and later work like this.
130131
AC_MSG_CHECKING(if clang supports -fno-strength-reduce)
131-
if test "$CLANG_VERSION" -ge 500002075 ; then
132+
if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
132133
AC_MSG_RESULT(no)
133134
CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
134135
else

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2431,
753755
/**/
754756
2430,
755757
/**/

0 commit comments

Comments
 (0)