[06/10] build: Use cflags from compel for pie.lib.a

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

Details

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

Commit Message

Dmitry Safonov May 17, 2019, 10:53 p.m.
As pie.lib.a linked also to PIEs - we need to use missing flags as
-nostdlib and -fomit-frame-pointer.

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

Patch hide | download patch | download mbox

diff --git a/criu/Makefile b/criu/Makefile
index 1e9a167895ad..3de6eb217e5a 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -9,6 +9,7 @@  export ARCH_DIR PIE_DIR
 ifeq ($(filter clean mrproper,$(MAKECMDGOALS)),)
         CFLAGS		+= $(shell $(COMPEL_BIN) includes)
         COMPEL_LIBS	:= $(shell $(COMPEL_BIN) --static libs)
+        CFLAGS_PIE	+= $(shell $(COMPEL_BIN) cflags)
 endif
 
 #
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index 526e4e1ad451..35aa78bd370e 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -11,7 +11,6 @@  ccflags-y	+= -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 ccflags-y	+= -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0
 
 ifneq ($(filter-out clean mrproper,$(MAKECMDGOALS)),)
-	CFLAGS		+= $(shell $(COMPEL_BIN) cflags)
 	LDFLAGS		+= $(shell $(COMPEL_BIN) ldflags)
 	compel_plugins	:= $(shell $(COMPEL_BIN) plugins)
 endif
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index 467dfd6b6524..2d11ad9235ef 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -6,7 +6,7 @@ 
 
 lib-name		:= pie.lib.a
 
-CFLAGS			+= -fno-stack-protector -DCR_NOGLIBC -fpie
+CFLAGS			+= -DCR_NOGLIBC
 
 lib-y			+= util.o