aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-11-18 17:12:15 +0100
committerYang Tse <yangsita@gmail.com>2010-11-18 17:12:15 +0100
commit1c4fa240bec959fd23f4826d9aa9e624fa48d01a (patch)
treecefc1db86657890496ee810bcd62c9608ea09215 /m4
parent5046dd02b9c909438d9ab8e9726094846a678f8d (diff)
configure: use autobuilds to temporarily verify strict aliasing warnings.
Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing rules and warnings. Given that cross-compiled targets autobuilds do not run the
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-compilers.m45
1 files changed, 5 insertions, 0 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 413293b10..44998c06e 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -935,6 +935,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
dnl Also, on gcc 4.0.X it is totally unbearable and complains all
dnl over making it unusable for generic purposes. Let's not use it.
tmp_CFLAGS="$tmp_CFLAGS"
+ dnl When cross-compiling with gcc 3.0 or later,
+ dnl enable strict aliasing rules and warnings.
+ if test "x$cross_compiling" = "xyes"; then
+ tmp_CFLAGS="$tmp_CFLAGS -fstrict-aliasing -Wstrict-aliasing=2"
+ fi
fi
#
dnl Only gcc 3.3 or later