mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-23 07:29:28 +01:00
2c0e997ee8
Gentoo (and others) define _FORTIFY_SOURCE=2 by default. Since we always define it as well, this results in redefinition warnings & configure failure.
28 lines
737 B
Plaintext
28 lines
737 B
Plaintext
AC_DEFUN([AC_PROG_CC_PIE], [
|
|
AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], ac_cv_prog_cc_pie, [
|
|
echo 'void f(){}' > conftest.c
|
|
if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then
|
|
ac_cv_prog_cc_pie=yes
|
|
else
|
|
ac_cv_prog_cc_pie=no
|
|
fi
|
|
rm -rf conftest*
|
|
])
|
|
])
|
|
|
|
AC_DEFUN([COMPILER_FLAGS], [
|
|
if (test "${CFLAGS}" = ""); then
|
|
CFLAGS="-Wall -O2 -fsigned-char "
|
|
CFLAGS+=" -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
|
|
fi
|
|
if (test "$USE_MAINTAINER_MODE" = "yes"); then
|
|
CFLAGS+=" -Werror -Wextra"
|
|
CFLAGS+=" -Wno-unused-parameter"
|
|
CFLAGS+=" -Wno-missing-field-initializers"
|
|
CFLAGS+=" -Wdeclaration-after-statement"
|
|
CFLAGS+=" -Wmissing-declarations"
|
|
CFLAGS+=" -Wredundant-decls"
|
|
CFLAGS+=" -Wcast-align"
|
|
fi
|
|
])
|