[CRIU] [PATCH 08/10] make: Move CR_NOGLIBC into CFLAGS_PIE

Dmitry Safonov dima at arista.com
Sat May 18 01:53:07 MSK 2019


Lesser duplication, cleaner Makefiles.

Signed-off-by: Dmitry Safonov <dima at arista.com>
---
 Makefile                  | 2 ++
 compel/plugins/Makefile   | 2 +-
 criu/pie/Makefile         | 1 -
 criu/pie/Makefile.library | 2 --
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 84fc0841fca2..cee8a42c9b76 100644
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,8 @@ ifeq ($(ARCH),s390)
         DEFINES		:= -DCONFIG_S390
         CFLAGS_PIE	:= -fno-optimize-sibling-calls
 endif
+
+CFLAGS_PIE		+= -DCR_NOGLIBC
 export CFLAGS_PIE
 
 LDARCH ?= $(SRCARCH)
diff --git a/compel/plugins/Makefile b/compel/plugins/Makefile
index 8f44ba86db8e..a326e2a661a3 100644
--- a/compel/plugins/Makefile
+++ b/compel/plugins/Makefile
@@ -1,5 +1,5 @@
 CFLAGS		:= $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
-CFLAGS		+= -DCR_NOGLIBC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+CFLAGS		+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 CFLAGS		+= -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
 
 PLUGIN_ARCH_DIR		:= compel/arch/$(ARCH)/plugins
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index 35aa78bd370e..bb65f89089ce 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -6,7 +6,6 @@ target		:= parasite restorer
 
 CFLAGS		:= $(filter-out -pg $(CFLAGS-GCOV) $(CFLAGS-ASAN),$(CFLAGS))
 ccflags-y	+= $(CFLAGS_PIE)
-ccflags-y	+= -DCR_NOGLIBC
 ccflags-y	+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 ccflags-y	+= -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
 
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index 2d11ad9235ef..423c782aa64b 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -6,8 +6,6 @@
 
 lib-name		:= pie.lib.a
 
-CFLAGS			+= -DCR_NOGLIBC
-
 lib-y			+= util.o
 
 ifeq ($(VDSO),y)
-- 
2.21.0



More information about the CRIU mailing list