Commit 67b7c98e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

criu Makefiles: rm old compel leftovers

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: 's avatarKir Kolyshkin <kir@openvz.org>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent a90c07d6
......@@ -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
......
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
......@@ -50,13 +47,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 $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment