build: Undef _FORTIFY_SOURCE for unoptimized builds

'./configure --disable-optimization --enable-maintainer-mode' would
result in build errors. _FORTIFY_SOURCE requires that optimization is
enabled and issues a compile-time warning which is treated as an
error. Disabling optimization takes precedence over fortification in
this case, since it is being explicitly requested.
This commit is contained in:
Mat Martineau 2016-08-09 15:32:56 -07:00 committed by Denis Kenzior
parent 2264ac8a5f
commit bf82c69f10
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ LT_INIT([disable-static])
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
CFLAGS="$CFLAGS -O0"
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -O0"
fi
])