[CRIU] [PATCH 15/19] compel: Build host program

Cyrill Gorcunov gorcunov at openvz.org
Wed Sep 21 13:54:30 PDT 2016


It's needed in case of cross-compile

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 compel/Makefile                           | 9 +++++++++
 compel/arch/x86/src/lib/handle-elf-host.c | 1 +
 compel/src/lib/handle-elf-32-host.c       | 1 +
 compel/src/lib/handle-elf-host.c          | 1 +
 compel/src/main-host.c                    | 1 +
 5 files changed, 13 insertions(+)
 create mode 120000 compel/arch/x86/src/lib/handle-elf-host.c
 create mode 120000 compel/src/lib/handle-elf-32-host.c
 create mode 120000 compel/src/lib/handle-elf-host.c
 create mode 120000 compel/src/main-host.c

diff --git a/compel/Makefile b/compel/Makefile
index 52eb27ea72f4..001ed385e6f0 100644
--- a/compel/Makefile
+++ b/compel/Makefile
@@ -19,5 +19,14 @@ obj-y			+= src/main.o
 CFLAGS_handle-elf-32.o += -UCONFIG_X86_64 -DCONFIG_X86_32
 CFLAGS_handle-elf-32.d += -UCONFIG_X86_64 -DCONFIG_X86_32
 
+host-ccflags-y		+= $(ccflags-y)
+
+hostprogs-y		+= compel-host
+compel-host-objs	:= $(patsubst %.o,%-host.o,$(obj-y) $(lib-y))
+
+HOSTCFLAGS_handle-elf-32-host.o += -UCONFIG_X86_64 -DCONFIG_X86_32
+HOSTCFLAGS_handle-elf-32-host.d += -UCONFIG_X86_64 -DCONFIG_X86_32
+
 cleanup-y		+= compel/compel
+cleanup-y		+= compel/compel-host
 cleanup-y		+= compel/libcompel.so
diff --git a/compel/arch/x86/src/lib/handle-elf-host.c b/compel/arch/x86/src/lib/handle-elf-host.c
new file mode 120000
index 000000000000..fe4611886df8
--- /dev/null
+++ b/compel/arch/x86/src/lib/handle-elf-host.c
@@ -0,0 +1 @@
+handle-elf.c
\ No newline at end of file
diff --git a/compel/src/lib/handle-elf-32-host.c b/compel/src/lib/handle-elf-32-host.c
new file mode 120000
index 000000000000..126cd5984674
--- /dev/null
+++ b/compel/src/lib/handle-elf-32-host.c
@@ -0,0 +1 @@
+handle-elf-32.c
\ No newline at end of file
diff --git a/compel/src/lib/handle-elf-host.c b/compel/src/lib/handle-elf-host.c
new file mode 120000
index 000000000000..fe4611886df8
--- /dev/null
+++ b/compel/src/lib/handle-elf-host.c
@@ -0,0 +1 @@
+handle-elf.c
\ No newline at end of file
diff --git a/compel/src/main-host.c b/compel/src/main-host.c
new file mode 120000
index 000000000000..8a03e9439ec4
--- /dev/null
+++ b/compel/src/main-host.c
@@ -0,0 +1 @@
+main.c
\ No newline at end of file
-- 
2.7.4



More information about the CRIU mailing list