From: Christian Brauner Date: Tue, 5 Feb 2019 19:33:40 +0000 (+0100) Subject: compiler: -Wold-style-definition hardening X-Git-Tag: lxc-3.2.0~166^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11af5f2ba169c63b4da2980a6688028502c5fe7b;p=thirdparty%2Flxc.git compiler: -Wold-style-definition hardening Warn if an old-style function definition is used. A warning is given even if there is a previous prototype. Signed-off-by: Christian Brauner --- diff --git a/configure.ac b/configure.ac index 5918bc5e4..2e2209239 100644 --- a/configure.ac +++ b/configure.ac @@ -703,6 +703,7 @@ AX_CHECK_COMPILE_FLAG([--mcet -fcf-protection], [CFLAGS="$CFLAGS --mcet -fcf-pro AX_CHECK_COMPILE_FLAG([-Werror=implicit-function-declaration], [CFLAGS="$CFLAGS -Werror=implicit-function-declaration"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CFLAGS="$CFLAGS -Wlogical-op"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-Wmissing-include-dirs], [CFLAGS="$CFLAGS -Wmissing-include-dirs"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-Wold-style-definition], [CFLAGS="$CFLAGS -Wold-style-definition"],,[-Werror]) AX_CHECK_LINK_FLAG([-z relro], [LDLAGS="$LDLAGS -z relro"],,[]) AX_CHECK_LINK_FLAG([-z now], [LDLAGS="$LDLAGS -z now"],,[])