[BUILD] add -fno-strict-aliasing to fix warnings with gcc >= 4.4
Gcc 4.4 enables strict aliasing by default, resuling in complaints
when casting struct sockaddr_storage to sockaddr_in. Not only doing
this does not provide any noticeable performance improvement, it also
presents a risk of strange bugs even when the compiler does not emit
a warning, so let's disable this optimization !
diff --git a/Makefile.osx b/Makefile.osx
index ab15e10..f60508e 100644
--- a/Makefile.osx
+++ b/Makefile.osx
@@ -86,6 +86,7 @@
TARGET_OPTS=$(COPTS.$(TARGET))
REGEX_OPTS=$(COPTS.$(REGEX))
CPU_OPTS=$(COPTS.$(CPU))
+SPEC_OPTS=-fno-strict-aliasing
VERSION != cat VERSION 2>/dev/null || touch VERSION
SUBVERS != cat SUBVERS 2>/dev/null || touch SUBVERS
@@ -95,7 +96,7 @@
-DCONFIG_HAPROXY_DATE=\"$(VERDATE)\"
COPTS = -Iinclude -I$(EBTREE_DIR) $(ADDINC) $(CPU_OPTS) $(TARGET_OPTS) \
- $(REGEX_OPTS) $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
+ $(SPEC_OPTS) $(REGEX_OPTS) $(SMALL_OPTS) $(VER_OPTS) $(DEFINE)
LIBS = $(LIBS.$(TARGET)) $(LIBS.$(REGEX)) $(ADDLIB)
CFLAGS = -Wall $(COPTS) $(DEBUG) -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4
LDFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mmacosx-version-min=10.4