Commit 01e475a6 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

Fix Fedora build (undo _FORTIFY_SOURCE for pie)

Recent Fedora releases add -Wp,-D_FORTIFY_SOURCE=2 to rpm builds,
which breaks compiling pie code on some architectures due to its
trying to use (absent) memcpy_chk() instead of usual memcpy().

We must stand strong against FORTIFY_SOURCE in pie code.
No pasaran! Viva la resistance!

NOTE: in tests, FORTIFY_SOURCE is disabled for completely different
reasons (see commit d1a36cc9 for details), so we're not touching it.

[v2: resend the correct (latest) version]
Reported-by: 's avatarReported-by: Adrian Reber <adrian@lisas.de>
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 17366e2e
......@@ -22,6 +22,7 @@ CFLAGS += -iquote $(SRC_DIR)/criu/include
CFLAGS += -iquote $(SRC_DIR)/include
CFLAGS += -iquote $(SRC_DIR)
CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
ifneq ($(filter-out ia32,$(ARCH)),)
......
......@@ -50,3 +50,4 @@ else
endif
ccflags-y += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
ccflags-y += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment