]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge, from trunk, r15651 (Do not compile with -Wcast-align on arm.)
authorJulian Seward <jseward@acm.org>
Mon, 21 Sep 2015 09:51:07 +0000 (09:51 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 21 Sep 2015 09:51:07 +0000 (09:51 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_11_BRANCH@15661

Makefile.all.am
configure.ac

index 708e8d891024edc2ab590d4ec3dee3f5bf4dd9b6..44a6207ab32d0bc3cf2a1e1d0045f7ac01d26b44 100644 (file)
@@ -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@ \
index 1f2ab102eb24173f62150b89958a5049ef118c01..0652b5cd3e0e5e8aa8a2055719f509d0ef038301 100644 (file)
@@ -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])