3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 05:39:24 +01:00

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

View File

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