[CRIU] [PATCH 1/2] make: Add -fno-strict-aliasing
Cyrill Gorcunov
gorcunov at openvz.org
Tue Jul 31 08:04:00 EDT 2012
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 <gorcunov at openvz.org>
---
Makefile | 2 +-
Makefile.pie | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 3cb51a0..597f767 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 6f6a3d4..a7fae1d 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)
--
1.7.7.6
More information about the CRIU
mailing list