[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.bsd b/Makefile.bsd
index 5027830..1ce871b 100644
--- a/Makefile.bsd
+++ b/Makefile.bsd
@@ -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
@@ -98,7 +99,7 @@
EBTREE_DIR := ebtree
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)
LDFLAGS = -g