From: Christian Brauner Date: Fri, 12 Oct 2018 19:23:07 +0000 (+0200) Subject: autools: use -fno-strict-aliasing X-Git-Tag: lxc-3.1.0~47^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3bb6b8ed95013f9e7b21db833cd5d0da6671019;p=thirdparty%2Flxc.git autools: use -fno-strict-aliasing The gcc implementation and the C standard are not to be considered sane in this respect. We don't want to risk reordering of writes when the compiler incorrectly *thinks* two types do not alias each other. Signed-off-by: Christian Brauner --- diff --git a/configure.ac b/configure.ac index cbd6dbb7b..a7358fe59 100644 --- a/configure.ac +++ b/configure.ac @@ -694,6 +694,7 @@ AX_CHECK_COMPILE_FLAG([-fdiagnostics-color], [CFLAGS="$CFLAGS -fdiagnostics-colo AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough], [CFLAGS="$CFLAGS -Wimplicit-fallthrough"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"],,[-Werror]) AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"],,[-Werror]) +AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing], [CFLAGS="$CFLAGS -fno-strict-aliasing"],,[-Werror]) AX_CHECK_LINK_FLAG([-z relro], [LDLAGS="$LDLAGS -z relro"],,[]) AX_CHECK_LINK_FLAG([-z now], [LDLAGS="$LDLAGS -z now"],,[])