Skip to content

Commit

Permalink
* acinclude.m4: only turn on FORTIFY_SOURCE if it won't anger gcc
Browse files Browse the repository at this point in the history
Following libvirt commits cf9bced0 and 1c2edf0f
  • Loading branch information
David Lutterkort committed Jan 23, 2013
1 parent 647bc8e commit 4474286
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion acinclude.m4
Expand Up @@ -19,7 +19,7 @@ AC_DEFUN([AUGEAS_COMPILE_WARNINGS],[
warnCFLAGS=
common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
common_flags="-fexceptions -fasynchronous-unwind-tables"
case "$enable_compile_warnings" in
no)
Expand All @@ -45,6 +45,14 @@ AC_DEFUN([AUGEAS_COMPILE_WARNINGS],[
;;
esac
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting newer glibc. */
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
])
compiler_flags=
for option in $try_compiler_flags; do
SAVE_CFLAGS="$CFLAGS"
Expand Down

0 comments on commit 4474286

Please sign in to comment.