[CRIU] [PATCH 3/6] make: respect USERCFLAGS in zdtm makefiles

Filipe Brandenburger filbranden at google.com
Thu May 22 11:18:02 PDT 2014


Signed-off-by: Filipe Brandenburger <filbranden at google.com>
---
 Makefile                           | 1 +
 test/zdtm/lib/Makefile             | 1 +
 test/zdtm/live/static/Makefile     | 3 ++-
 test/zdtm/live/streaming/Makefile  | 1 +
 test/zdtm/live/transition/Makefile | 1 +
 5 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 231d1036dbaf..852c52e73456 100644
--- a/Makefile
+++ b/Makefile
@@ -120,6 +120,7 @@ CRIU-INC	:= lib/criu.h include/criu-plugin.h include/criu-log.h protobuf/rpc.pro
 
 export CC MAKE CFLAGS LIBS SRCARCH DEFINES MAKEFLAGS CRIU-SO
 export SRC_DIR SYSCALL-LIB SH RM ARCH_DIR OBJCOPY LDARCH LD
+export USERCFLAGS
 export cflags-y
 export VDSO_O
 
diff --git a/test/zdtm/lib/Makefile b/test/zdtm/lib/Makefile
index d5b5e26e366f..6ca52170a6af 100644
--- a/test/zdtm/lib/Makefile
+++ b/test/zdtm/lib/Makefile
@@ -1,6 +1,7 @@
 include ../Makefile.inc
 
 CFLAGS	= -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+CFLAGS	+= $(USERCFLAGS)
 
 LIBDIR	= .
 LIB	= libzdtmtst.a
diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index c045552f327d..7fee4e10b681 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -4,6 +4,7 @@ LIBDIR	= ../../lib
 LIB	= $(LIBDIR)/libzdtmtst.a
 override CPPFLAGS += -I$(LIBDIR)
 CFLAGS	= -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+CFLAGS	+= $(USERCFLAGS)
 
 TST_NOFILE	=				\
 		busyloop00			\
@@ -290,7 +291,7 @@ criu-rtc.pb-c.c: criu-rtc.proto
 	protoc-c --proto_path=. --c_out=. criu-rtc.proto
 
 criu-rtc.so: criu-rtc.c criu-rtc.pb-c.c
-	gcc -g -Wall -shared -nostartfiles criu-rtc.c criu-rtc.pb-c.c -o criu-rtc.so -iquote ../../../../include -fPIC
+	gcc -g -Wall -shared -nostartfiles criu-rtc.c criu-rtc.pb-c.c -o criu-rtc.so -iquote ../../../../include -fPIC $(USERCFLAGS)
 
 .PHONY:	force clean cleandep cleanout realclean start check_start stop wait_stop
 
diff --git a/test/zdtm/live/streaming/Makefile b/test/zdtm/live/streaming/Makefile
index ebf8a9aa3a81..1149dbe252bd 100644
--- a/test/zdtm/live/streaming/Makefile
+++ b/test/zdtm/live/streaming/Makefile
@@ -4,6 +4,7 @@ LIBDIR	= ../../lib
 LIB	= $(LIBDIR)/libzdtmtst.a
 override CPPFLAGS += -I$(LIBDIR)
 CFLAGS	= -g -O2 -Wall -Werror -fno-strict-aliasing
+CFLAGS	+= $(USERCFLAGS)
 
 TST_NOFILE	=	\
 		pipe_loop00	\
diff --git a/test/zdtm/live/transition/Makefile b/test/zdtm/live/transition/Makefile
index a4d01270c769..66b9589911f8 100644
--- a/test/zdtm/live/transition/Makefile
+++ b/test/zdtm/live/transition/Makefile
@@ -4,6 +4,7 @@ LIBDIR	= ../../lib
 LIB	= $(LIBDIR)/libzdtmtst.a
 override CPPFLAGS += -I$(LIBDIR)
 CFLAGS	= -g -O2 -Wall -Werror
+CFLAGS	+= $(USERCFLAGS)
 
 TST_NOFILE	=	\
 		ipc		\
-- 
1.9.1.423.g4596e3a



More information about the CRIU mailing list