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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.ac b/configure.ac
index f257d93..65d56c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1967,6 +1967,15 @@
 ])
 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])