From: Florian Krohm Date: Mon, 14 Sep 2015 21:11:32 +0000 (+0000) Subject: Do not compile with -Wcast-align on arm. There are too many X-Git-Tag: svn/VALGRIND_3_12_0~357 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41e80f2288b6c1fd013ace31fbc790457984e26;p=thirdparty%2Fvalgrind.git Do not compile with -Wcast-align on arm. There are too many warnings due to GCC being very conservative. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15651 --- diff --git a/Makefile.all.am b/Makefile.all.am index 708e8d8910..44a6207ab3 100644 --- a/Makefile.all.am +++ b/Makefile.all.am @@ -100,12 +100,12 @@ AM_CFLAGS_BASE = \ -O2 -g \ -std=gnu99 \ -Wall \ - -Wcast-align \ -Wmissing-prototypes \ -Wshadow \ -Wpointer-arith \ -Wstrict-prototypes \ -Wmissing-declarations \ + @FLAG_W_CAST_ALIGN@ \ @FLAG_W_CAST_QUAL@ \ @FLAG_W_WRITE_STRINGS@ \ @FLAG_W_EMPTY_BODY@ \ diff --git a/configure.ac b/configure.ac index f257d93c11..65d56c7d63 100644 --- a/configure.ac +++ b/configure.ac @@ -1967,6 +1967,15 @@ AC_MSG_RESULT([-Wextra]) ]) CFLAGS=$safe_CFLAGS +# On ARM we do not want to pass -Wcast-align as that produces loads +# of warnings. GCC is just being conservative. See here: +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65459#c4 +if test "X$VGCONF_ARCH_PRI" = "Xarm"; then + AC_SUBST([FLAG_W_CAST_ALIGN], [""]) +else + AC_SUBST([FLAG_W_CAST_ALIGN], [-Wcast-align]) +fi + # does this compiler support -fno-stack-protector ? AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])