From 870cd76283e003a0fa57449aa077f0d01a6a2d80 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Mon, 9 Jan 2023 13:18:08 +0000 Subject: patch 9.0.1162: configure does not handle all FORTIFY_SOURCE variants Problem: Configure does not handle all FORTIFY_SOURCE variants. Solution: Also handle Fedora's default FORTIFY_SOURCE flags. (Zdenek Dohnal, closes #11794) --- src/configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/configure.ac') diff --git a/src/configure.ac b/src/configure.ac index fc346dc811..93fbc32a7f 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4588,8 +4588,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/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-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/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-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/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_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/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE//g' -e 's/ *-U_FORTIFY_SOURCE//g'` AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) -- cgit v1.2.3