From: Christian Brauner Date: Tue, 5 May 2020 07:21:33 +0000 (+0200) Subject: gcc: add -Warray-bounds, -Wrestrict, -Wreturn-local-addr, -Wstringop-overflow X-Git-Tag: lxc-5.0.0~440^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6acf25e36a6df5f10b24fe57b4f186723d22bdf9;p=thirdparty%2Flxc.git gcc: add -Warray-bounds, -Wrestrict, -Wreturn-local-addr, -Wstringop-overflow Signed-off-by: Christian Brauner --- diff --git a/configure.ac b/configure.ac index d9365ac02..c55810831 100644 --- a/configure.ac +++ b/configure.ac @@ -753,6 +753,10 @@ AX_CHECK_COMPILE_FLAG([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"],,[ AX_CHECK_COMPILE_FLAG([-fasynchronous-unwind-tables], [CFLAGS="$CFLAGS -fasynchronous-unwind-tables"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-pipe], [CFLAGS="$CFLAGS -pipe"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-fexceptions], [CFLAGS="$CFLAGS -fexceptions"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-Warray-bounds], [CFLAGS="$CFLAGS -Warray-bounds"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-Wrestrict], [CFLAGS="$CFLAGS -Wrestrict"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-Wreturn-local-addr], [CFLAGS="$CFLAGS -Wreturn-local-addr"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [CFLAGS="$CFLAGS -Wstringop-overflow"],,[-Werror]) AX_CHECK_LINK_FLAG([-z relro], [LDFLAGS="$LDFLAGS -z relro"],,[]) AX_CHECK_LINK_FLAG([-z now], [LDFLAGS="$LDFLAGS -z now"],,[])