From 1663d74996e2161a712feec1564a398dc4ed1d37 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Tue, 14 Aug 2012 14:22:42 +0400 Subject: [PATCH] make: Add -fno-strict-aliasing Since we use some kernel tricks for CMSG_FIRSTHDR some compilers (in particular gcc version 4.4.5 20110214 (Red Hat 4.4.5-6)) do complain about strict aliasing. Thus pass -fno-strict-aliasing to be on the same coast as kernel is. Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- Makefile | 2 +- Makefile.pie | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2fcedd045..3d6189b6a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ include Makefile.inc CFLAGS += -I./include -CFLAGS += -O0 -ggdb3 +CFLAGS += -O0 -ggdb3 -fno-strict-aliasing LIBS += -lrt -lpthread -lprotobuf-c diff --git a/Makefile.pie b/Makefile.pie index 6f6a3d458..a7fae1d06 100644 --- a/Makefile.pie +++ b/Makefile.pie @@ -24,7 +24,7 @@ DEPS += $(patsubst %.o,%.d,$(POBJS)) DEPS += $(patsubst %.o,%.d,$(ROBJS)) PIELDS := pie.lds.S -PIEFLAGS := -fpie -Wa,--noexecstack +PIEFLAGS := -fpie -Wa,--noexecstack -fno-strict-aliasing ASMFLAGS := -D__ASSEMBLY__ $(PASM-OBJS): $(PASM-SRC) $(SYS-OBJ)