Skip to content

Commit 91b992c

Browse files
committed
patch 8.1.2316: FORTIFY_SOURCE can also be present in CPPFLAGS
Problem: FORTIFY_SOURCE can also be present in CPPFLAGS. Solution: Remove it in configure. (Benedikt Morbach, closes #2786)
1 parent 539aa6b commit 91b992c

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/auto/configure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12989,8 +12989,8 @@ if ac_fn_c_try_link "$LINENO"; then :
1298912989
$as_echo "yes" >&6; }; $as_echo "#define HAVE_CANBERRA 1" >>confdefs.h
1299012990

1299112991
else
12992-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993-
$as_echo "no" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
12992+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
12993+
$as_echo "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
1299412994
fi
1299512995
rm -f core conftest.err conftest.$ac_objext \
1299612996
conftest$ac_exeext conftest.$ac_ext
@@ -14807,6 +14807,7 @@ $as_echo "no" >&6; }
1480714807
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
1480814808
if test "$gccmajor" -gt "3"; then
1480914809
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/'`
14810+
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
1481014811
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1481114812
$as_echo "yes" >&6; }
1481214813
else

src/configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3789,7 +3789,7 @@ if test "$enable_canberra" = "yes"; then
37893789
ca_context *hello;
37903790
ca_context_create(&hello);],
37913791
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CANBERRA),
3792-
AC_MSG_RESULT(no); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
3792+
AC_MSG_RESULT(no; try installing libcanberra-dev); CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS")
37933793
fi
37943794

37953795

@@ -4482,6 +4482,7 @@ if test "$GCC" = yes; then
44824482
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
44834483
if test "$gccmajor" -gt "3"; then
44844484
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/'`
4485+
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ *-Wp,-D_FORTIFY_SOURCE=.//g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
44854486
AC_MSG_RESULT(yes)
44864487
else
44874488
AC_MSG_RESULT(no)

src/version.c

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

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
2316,
744746
/**/
745747
2315,
746748
/**/

0 commit comments

Comments
 (0)