]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Do not compile with -Wcast-align on arm. There are too many
authorFlorian Krohm <florian@eich-krohm.de>
Mon, 14 Sep 2015 21:11:32 +0000 (21:11 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Mon, 14 Sep 2015 21:11:32 +0000 (21:11 +0000)
warnings due to GCC being very conservative.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15651

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 f257d93c11b05eeb246d9dcda5e26cb88ad98368..65d56c7d637c022faec82390a70dfe645bec0ca5 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])