diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-02 13:30:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-02 13:30:59 +0200 |
commit | 3fa5e64e0ed55de718e48d0268edc360b2352bc1 (patch) | |
tree | 01208e9281aee3638b855dd495daa3a9ccb59727 /src/configure.ac | |
parent | ef38bcf05196ad7e795dd77b4922fa9db58fc310 (diff) | |
download | vim-git-3fa5e64e0ed55de718e48d0268edc360b2352bc1.tar.gz |
patch 8.2.2691: autoconf may mess up compiler flagsv8.2.2691
Problem: Autoconf may mess up compiler flags.
Solution: Handle removing FORTIFY_SOURCE a bit better. (Vladimir Lomov,
closes #8049)
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/configure.ac b/src/configure.ac index 0bb5cc557..c63c0eced 100644 --- 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) |