build: Don't forget to relink arch builtins on change

Submitted by Cyrill Gorcunov on May 21, 2016, 10:46 a.m.

Details

Message ID 1463827599-22645-1-git-send-email-gorcunov@openvz.org
State Accepted
Series "build: Don't forget to relink arch builtins on change"
Commit 2fb5d56c819dccf5dde0c0abdfe0ae3a6e78f8c9
Headers show

Commit Message

Cyrill Gorcunov May 21, 2016, 10:46 a.m.
https://github.com/xemul/criu/issues/163

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

Patch hide | download patch | download mbox

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:

Comments

Pavel Emelianov May 23, 2016, 5:08 p.m.
Applied