mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
Build with the -fno-strict-aliasing flag on GCC.
You do not want to know about the 2 hours I just spent tracking down an evdns bug that only affected me on some platforms to the way we were using sockaddr* and sockaddr_in*. Suffice it to say that I do not think this is the only C99-aliasing-dubiousness in our code, nor that I am smart enough to keep my code correct with the GCC's strict aliasing optimizations in place. svn:r1079
This commit is contained in:
parent
2546ea665e
commit
52eb495130
@ -19,7 +19,11 @@ AC_PROG_LN_S
|
||||
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
if test "$GCC" = yes ; then
|
||||
# Enable many gcc warnings by default...
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user