[CRIU] [PATCH] build: Don't forget to relink arch builtins on change

Cyrill Gorcunov gorcunov at openvz.org
Sat May 21 03:46:39 PDT 2016


https://github.com/xemul/criu/issues/163

Reported-by: Andrey Vagin <avagin at virtuozzo.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/criu/Makefile b/criu/Makefile
index 9b6682d172e5..e8e8c8b45917 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -99,13 +99,12 @@ syscalls_lib: config
 #
 # Architecture dependant part.
 ARCH-LIB		:= $(ARCH_DIR)/crtools.built-in.o
-arch_lib: syscalls_lib
+$(ARCH-LIB): syscalls_lib
 	$(Q) $(MAKE) $(call build-as,Makefile,$(ARCH_DIR)) all
-.PHONY: arch_lib
 
 #
 # PIE library code.
-pie/native.lib.a: arch_lib
+pie/native.lib.a: $(ARCH-LIB)
 	$(Q) $(MAKE) $(call build-as,Makefile.library,pie) all
 
 #
@@ -119,13 +118,14 @@ pie: pie/native.lib.a
 PROGRAM-BUILTINS	+= ../images/built-in.o
 PROGRAM-BUILTINS	+= built-in.o
 PROGRAM-BUILTINS	+= pie/native.lib.a
+PROGRAM-BUILTINS	+= $(ARCH-LIB)
 
 built-in.o: pie
 	$(Q) $(MAKE) $(call build-as,Makefile.crtools,.) all
 
 criu: $(PROGRAM-BUILTINS)
 	$(call msg-link, $@)
-	$(Q) $(CC) $(CFLAGS) $^ $(ARCH-LIB) $(LIBS) $(WRAPFLAGS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
+	$(Q) $(CC) $(CFLAGS) $^ $(LIBS) $(WRAPFLAGS) $(LDFLAGS) $(GMONLDOPT) -rdynamic -o $@
 
 
 subclean:
-- 
2.5.5



More information about the CRIU mailing list