From: Christian Brauner Date: Tue, 5 Feb 2019 22:47:31 +0000 (+0100) Subject: compiler: -Werror=shift-count-overflow hardening X-Git-Tag: lxc-3.2.0~165^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=463bee7b8d76b299c5c5c24c27830df80b9f2b84;p=thirdparty%2Flxc.git compiler: -Werror=shift-count-overflow hardening Warn if shift count >= width of type. Signed-off-by: Christian Brauner --- diff --git a/configure.ac b/configure.ac index 761ad0ac8..729f262c0 100644 --- a/configure.ac +++ b/configure.ac @@ -715,6 +715,7 @@ AX_CHECK_COMPILE_FLAG([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-Wendif-labels], [CFLAGS="$CFLAGS -Wendif-labels"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-Werror=overflow], [CFLAGS="$CFLAGS -Werror=overflow"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-fdiagnostics-show-option], [CFLAGS="$CFLAGS -fdiagnostics-show-option"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-Werror=shift-count-overflow], [CFLAGS="$CFLAGS -Werror=shift-count-overflow"],,[-Werror]) AX_CHECK_LINK_FLAG([-z relro], [LDLAGS="$LDLAGS -z relro"],,[]) AX_CHECK_LINK_FLAG([-z now], [LDLAGS="$LDLAGS -z now"],,[])