Add -fno-strict-aliasing in global CFLAGS

This solves the bad checksum issue in udp header. The fill_udp_checksum()
function suffers from "strict aliasing" problem as it is doing quite a bit
of pointer casting.

Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
diff --git a/drivers/bcm57xx/Makefile b/drivers/bcm57xx/Makefile
index 87bb3bf..41babcb 100644
--- a/drivers/bcm57xx/Makefile
+++ b/drivers/bcm57xx/Makefile
@@ -16,7 +16,7 @@
 endif
 include $(TOP)/make.rules
 
-CFLAGS = -O2 -I. -I../common -I$(TOP)/clients/net-snk/include -I$(TOP)/lib/libc/include -fno-builtin -ffreestanding -msoft-float -Wall -nostdinc
+CFLAGS += -O2 -I. -I../common -I$(TOP)/clients/net-snk/include -I$(TOP)/lib/libc/include -fno-builtin -ffreestanding -msoft-float -Wall -nostdinc
 
 SRCS   = bcm57xx.c
 
diff --git a/drivers/common/Makefile b/drivers/common/Makefile
index 8b3ebe1..dc5fd86 100644
--- a/drivers/common/Makefile
+++ b/drivers/common/Makefile
@@ -16,7 +16,7 @@
 endif
 include $(TOP)/make.rules
 
-CFLAGS = -O2 -I./ -I$(TOP)/clients/net-snk/include/ -I$(TOP)/lib/libc/include/ -fno-builtin -ffreestanding -msoft-float -nostdinc -Wall
+CFLAGS += -O2 -I./ -I$(TOP)/clients/net-snk/include/ -I$(TOP)/lib/libc/include/ -fno-builtin -ffreestanding -msoft-float -nostdinc -Wall
 
 SRCS   = module_entry.c
 
diff --git a/make.rules b/make.rules
index 867245d..dae1572 100644
--- a/make.rules
+++ b/make.rules
@@ -62,7 +62,7 @@
 CPP		?= $(CROSS)cpp
 
 WARNFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes
-CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float \
+CFLAGS ?= -g -O2 -fno-builtin -ffreestanding -nostdinc -msoft-float -fno-strict-aliasing \
 	  -mno-altivec -mabi=no-altivec -fno-stack-protector $(WARNFLAGS)
 
 export CC AS LD CLEAN OBJCOPY OBJDUMP STRIP AR RANLIB CFLAGS
diff --git a/slof/Makefile.inc b/slof/Makefile.inc
index e08491f..d5878a3 100644
--- a/slof/Makefile.inc
+++ b/slof/Makefile.inc
@@ -29,7 +29,7 @@
 CPPFLAGS += -I. -I$(INCLCMNDIR) -I$(INCLBRDDIR) -I$(INCLCMNDIR)/$(CPUARCH)
 CFLAGS  = -DTARG=$(TARG) -static -Wall -W -std=gnu99 \
 	  -O2 -fomit-frame-pointer -msoft-float $(FLAG) $(CPUARCHDEF) \
-	  -fno-stack-protector
+	  -fno-stack-protector -fno-strict-aliasing 
 ASFLAGS = -Wa,-mpower4 -Wa,-mregnames $(FLAG) $(CPUARCHDEF)
 
 LDFLAGS += -static -nostdlib -Wl,-q,-n