[CRIU] [PATCH 1/9 v2] criu Makefiles: rm old compel leftovers
Kir Kolyshkin
kir at openvz.org
Wed Feb 22 15:15:41 PST 2017
As compel is an external tool now, let's treat it as such -- remove the
hardcoded paths to compel files, they are now provided via compel CLI.
Details:
1. The compel std plugin dependency is dropped from the intermediate
criu/Makefile. It was there in order to make sure plugin is built before
pie, but the top level Makefile and Makefile.compel take care about it.
2. The compel std plugin logic is simplified in criu/pie/Makefile.
3. The compel linker script dependency is kept as-is for now (except
the linker script file name no longer appears in the list of objects
to link).
4. Linking of compel std plugin is moved to a second linking stage
in order to simplify the Makefile.
Side note: we can actually avoid running the linker twice!
5. The compel binary dependency is dropped from criu/pie/Makefile
as this is already there in top-level Makefile (look for criu-deps).
[v2: reworked after dsafonov@ comments; keep most compel deps]
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
criu/Makefile | 2 +-
criu/pie/Makefile | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/criu/Makefile b/criu/Makefile
index 5c19d0a..e5fdde9 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -54,7 +54,7 @@ criu/pie/pie.lib.a: $(ARCH-LIB) .FORCE
#
# PIE code blobs themseves.
-pie: criu/pie/pie.lib.a compel/plugins/std.built-in.o
+pie: criu/pie/pie.lib.a
$(Q) $(MAKE) $(build)=criu/pie all
.PHONY: pie
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index f6e9ff2..bf5f0fa 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -1,8 +1,5 @@
target += parasite restorer
-parasite-obj-e += ./compel/plugins/std.built-in.o
-restorer-obj-e += ./compel/plugins/std.built-in.o
-
parasite-obj-y += parasite.o
restorer-obj-y += restorer.o
restorer-obj-y += ./$(ARCH_DIR)/restorer.o
@@ -49,13 +46,12 @@ LDS := $(SRC_DIR)/compel/arch/$(SRCARCH)/scripts/compel-pack.lds.S
target-name = $(patsubst criu/pie/%-blob.h,%,$(1))
-$(obj)/restorer.built-in.o: $(compel_std)
-$(obj)/parasite.built-in.o: $(compel_std)
-$(obj)/%.built-in.bin.o: $(obj)/%.built-in.o $(obj)/pie.lib.a $(LDS)
+$(obj)/%.build-in.bin.o: $(LDS)
+$(obj)/%.built-in.bin.o: $(obj)/%.built-in.o $(obj)/pie.lib.a $(compel_std)
$(call msg-gen, $@)
$(Q) $(LD) $(shell $(COMPEL_BIN) ldflags) -o $@ $^
-$(obj)/%-blob.h: $(obj)/%.built-in.bin.o $(SRC_DIR)/compel/compel-host-bin
+$(obj)/%-blob.h: $(obj)/%.built-in.bin.o
$(call msg-gen, $@)
$(Q) $(COMPEL_BIN) hgen -f $< -o $@
--
2.9.3
More information about the CRIU
mailing list