aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2013-08-22 10:40:46 +0530
committerNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2013-08-23 10:47:42 +0530
commit7eca6a5e56f468a58e1ef1feb8bd8705b6273e9d (patch)
tree46a2f7bdbe4eb05aa5da78d5d9b678894cbb1c0e
parent1abf624dfb7a84876a82ece6c7547ccb4e1cd755 (diff)
downloadSLOF-qemu-slof-20130823.zip
SLOF-qemu-slof-20130823.tar.gz
SLOF-qemu-slof-20130823.tar.bz2
Add -fno-strict-aliasing in global CFLAGSqemu-slof-20130823
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>
-rw-r--r--drivers/bcm57xx/Makefile2
-rw-r--r--drivers/common/Makefile2
-rw-r--r--make.rules2
-rw-r--r--slof/Makefile.inc2
4 files changed, 4 insertions, 4 deletions
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 @@ ifndef TOP
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 @@ ifndef TOP
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 @@ RANLIB ?= $(CROSS)ranlib
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 @@ INCLBRDDIR ?= $(TOPBRDDIR)/include
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