From 9af9aba62fd59dbae2649e5c12fe8a638b4b31e2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 21 Jul 2009 17:57:25 +0000 Subject: [PATCH] Add -fno-strict-aliasing to let 1.4 build happily on GCC 4.4 svn:r1367 --- ChangeLog | 1 + configure.in | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6c4e9fc2..2435c1f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ Changes in 1.4.12-stable: o Fix another pair of fencepost bugs in epoll.c. [Patch from Adam Langley.] o Do not break evdns connections to nameservers when our IP changes. o Set truncated flag correctly in evdns server replies. + o Disable strict aliasing with GCC: our code is not compliant with it. Changes in 1.4.11-stable: o Fix a bug when removing a timeout from the heap. [Patch from Marko Kreen] diff --git a/configure.in b/configure.in index 2f6799c9..8b2ee490 100644 --- a/configure.in +++ b/configure.in @@ -19,6 +19,9 @@ AC_PROG_LN_S AC_PROG_GCC_TRADITIONAL if test "$GCC" = yes ; then CFLAGS="$CFLAGS -Wall" + # And disable the strict-aliasing optimization, since it breaks + # our sockaddr-handling code in strange ways. + CFLAGS="$CFLAGS -fno-strict-aliasing" fi AC_ARG_ENABLE(gcc-warnings, @@ -310,6 +313,7 @@ AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(void *) AC_CHECK_TYPES([struct in6_addr], , , [#ifdef WIN32 #include