# HG changeset patch # User Bram Moolenaar # Date 1617363903 -7200 # Node ID c5cb45fc82d335f5151ccd17006537a54596e0a8 # Parent 8ed6e57cc3bd66c3d015dd1f8f5037cc09fad822 patch 8.2.2691: autoconf may mess up compiler flags Commit: https://github.com/vim/vim/commit/3fa5e64e0ed55de718e48d0268edc360b2352bc1 Author: Bram Moolenaar Date: Fri Apr 2 13:30:59 2021 +0200 patch 8.2.2691: autoconf may mess up compiler flags Problem: Autoconf may mess up compiler flags. Solution: Handle removing FORTIFY_SOURCE a bit better. (Vladimir Lomov, closes #8049) diff --git a/src/auto/configure b/src/auto/configure --- a/src/auto/configure +++ b/src/auto/configure @@ -14906,8 +14906,8 @@ if test "$GCC" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5 $as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; } if test "$gccmajor" -gt "3"; then - CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` - CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` + CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` + CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else diff --git a/src/configure.ac b/src/configure.ac --- a/src/configure.ac +++ b/src/configure.ac @@ -4484,8 +4484,8 @@ if test "$GCC" = yes; then dnl And undefine it first to avoid a warning. AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1) if test "$gccmajor" -gt "3"; then - CFLAGS=`echo "$CFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` - CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` + CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'` + CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'` AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2691, +/**/ 2690, /**/ 2689,