[08/10] make: Move CR_NOGLIBC into CFLAGS_PIE

Submitted by Dmitry Safonov on May 17, 2019, 10:53 p.m.

Details

Message ID 20190517225309.16082-9-dima@arista.com
State Accepted
Series "pie/build: Cleaning up PIE/compel"
Commit bd808f5d657fba8a225090b4ce0b93da86ce9905
Headers show

Commit Message

Dmitry Safonov May 17, 2019, 10:53 p.m.
Lesser duplication, cleaner Makefiles.

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

Patch hide | download patch | download mbox

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)