git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_11_BRANCH@15661
-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@ \
])
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])