[CRIU] [PATCH 54/78] compel: Include compel headers as system ones

Cyrill Gorcunov gorcunov at openvz.org
Mon Nov 7 08:36:39 PST 2016


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile.compel                                      | 20 ++++++++++++++------
 compel/Makefile                                      |  5 +++++
 compel/arch/arm/plugins/std/syscalls/gen-syscalls.pl | 16 ++++++++--------
 .../ppc64/plugins/std/syscalls/Makefile.syscalls     |  6 +++---
 .../arch/x86/plugins/std/syscalls/Makefile.syscalls  | 12 ++++++------
 compel/include/uapi/plugins                          |  1 +
 compel/plugins/Makefile                              |  7 +++++++
 compel/plugins/include/uapi/std/syscall-types.h      |  2 +-
 criu/Makefile                                        |  5 ++---
 criu/Makefile.crtools                                |  5 ++---
 criu/arch/aarch64/Makefile                           |  4 ++--
 criu/arch/aarch64/include/asm/types.h                |  2 +-
 criu/arch/aarch64/infect.c                           |  2 +-
 criu/arch/aarch64/restorer.c                         |  2 +-
 criu/arch/aarch64/vdso-pie.c                         |  2 +-
 criu/arch/arm/Makefile                               |  4 ++--
 criu/arch/arm/include/asm/types.h                    |  2 +-
 criu/arch/arm/infect.c                               |  2 +-
 criu/arch/arm/restorer.c                             |  2 +-
 criu/arch/ppc64/Makefile                             |  4 ++--
 criu/arch/ppc64/include/asm/types.h                  |  2 +-
 criu/arch/ppc64/infect.c                             |  2 +-
 criu/arch/ppc64/restorer.c                           |  2 +-
 criu/arch/ppc64/vdso-pie.c                           |  2 +-
 criu/arch/x86/Makefile                               |  4 ++--
 criu/arch/x86/crtools.c                              |  2 +-
 criu/arch/x86/include/asm/infect-types.h             |  2 +-
 criu/arch/x86/include/asm/restorer.h                 |  2 +-
 criu/arch/x86/include/asm/types.h                    |  2 +-
 criu/arch/x86/infect.c                               |  4 ++--
 criu/arch/x86/restorer.c                             |  2 +-
 criu/arch/x86/sigaction_compat.c                     |  2 +-
 criu/arch/x86/vdso-pie.c                             |  2 +-
 criu/cr-restore.c                                    |  2 +-
 criu/fsnotify.c                                      |  2 +-
 criu/include/infect.h                                |  2 +-
 criu/include/lock.h                                  |  2 +-
 criu/include/sigframe-common.h                       |  2 +-
 criu/infect.c                                        |  4 ++--
 criu/kerndat.c                                       |  2 +-
 criu/parasite-syscall.c                              |  2 +-
 criu/pie/Makefile                                    |  5 ++---
 criu/pie/Makefile.library                            |  4 ++--
 criu/pie/log-simple.c                                |  2 +-
 criu/pie/parasite-vdso.c                             |  2 +-
 criu/pie/parasite.c                                  |  2 +-
 criu/pie/pie-relocs.c                                |  2 +-
 criu/pie/pie-relocs.h                                |  2 +-
 criu/pie/restorer.c                                  |  4 ++--
 criu/pie/util-fd.c                                   |  2 +-
 criu/pie/util.c                                      |  2 +-
 criu/shmem.c                                         |  2 +-
 criu/uffd.c                                          |  2 +-
 53 files changed, 101 insertions(+), 83 deletions(-)
 create mode 120000 compel/include/uapi/plugins

diff --git a/Makefile.compel b/Makefile.compel
index a5999581b598..84d5c0769a71 100644
--- a/Makefile.compel
+++ b/Makefile.compel
@@ -26,30 +26,38 @@ $(SRC_DIR)/compel/include/asm: $(SRC_DIR)/compel/arch/$(ARCH)/src/lib/include
 	$(Q) ln -s $^ $@
 $(COMPEL_VERSION_HEADER): $(SRC_DIR)/compel/include/asm
 
+compel-uapi-links	+= $(SRC_DIR)/compel/include/uapi/compel
+compel-uapi-links	+= $(SRC_DIR)/compel/include/uapi/asm
+compel-uapi-links	+= $(SRC_DIR)/compel/include/asm
+
+compel-deps		+= $(compel-uapi-links)
+compel-deps		+= $(COMPEL_VERSION_HEADER)
+compel-deps		+= $(CONFIG_HEADER)
+
 #
 # Compel itself.
-compel/%: $(COMPEL_VERSION_HEADER) $(CONFIG_HEADER) .FORCE
+compel/%: $(compel-deps) .FORCE
 	$(Q) $(MAKE) $(build)=compel $@
 
 #
 # Plugins
-compel/plugins/%: $(COMPEL_VERSION_HEADER) $(CONFIG_HEADER) .FORCE
+compel/plugins/%: $(compel-deps) .FORCE
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 
 #
 # GNU make 4.x supports targets matching via wide
 # match targeting, where GNU make 3.x series (used on
 # Travis) is not, so we have to write them here explicitly.
-compel/plugins/std.built-in.o: $(COMPEL_VERSION_HEADER) .FORCE
+compel/plugins/std.built-in.o: $(compel-deps) .FORCE
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 
-compel/plugins/shmem.built-in.o: $(COMPEL_VERSION_HEADER) .FORCE
+compel/plugins/shmem.built-in.o: $(compel-deps) .FORCE
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 
-compel/plugins/fds.built-in.o: $(COMPEL_VERSION_HEADER) .FORCE
+compel/plugins/fds.built-in.o: $(compel-deps) .FORCE
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 
-compel/compel: compel/built-in.o compel/lib.a $(COMPEL_VERSION_HEADER)
+compel/compel: compel/built-in.o compel/lib.a | $(compel-deps)
 	$(call msg-link, $@)
 	$(Q) $(CC) $(CFLAGS) $^ $(WRAPFLAGS) $(LDFLAGS) -rdynamic -o $@
 
diff --git a/compel/Makefile b/compel/Makefile
index 8fcfcff67f69..2cc11f7fbcc9 100644
--- a/compel/Makefile
+++ b/compel/Makefile
@@ -9,6 +9,11 @@ ccflags-y		+= -iquote compel/include
 ccflags-y		+= -iquote compel/plugins/include
 ccflags-y		+= -fPIC
 
+#
+# UAPI inclusion, referred as <compel/...>
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
+
 lib-y			+= arch/$(ARCH)/src/lib/handle-elf.o
 host-lib-y		+= arch/$(ARCH)/src/lib/handle-elf.o
 lib-y			+= src/lib/handle-elf.o
diff --git a/compel/arch/arm/plugins/std/syscalls/gen-syscalls.pl b/compel/arch/arm/plugins/std/syscalls/gen-syscalls.pl
index c683e4998b1a..a0942114d330 100755
--- a/compel/arch/arm/plugins/std/syscalls/gen-syscalls.pl
+++ b/compel/arch/arm/plugins/std/syscalls/gen-syscalls.pl
@@ -6,14 +6,14 @@ use warnings;
 my $in         = $ARGV[0];
 my $codesout   = $ARGV[1];
 my $codes      = $ARGV[1];
-$codes         =~ s/.*include\///g;
+$codes         =~ s/.*include\/uapi\//compel\/plugins\//g;
 my $protosout  = $ARGV[2];
 my $protos     = $ARGV[2];
-$protos        =~ s/.*include\///g;
+$protos        =~ s/.*include\/uapi\//compel\/plugins\//g;
 my $asmout     = $ARGV[3];
 my $asmcommon  = $ARGV[4];
 my $prototypes = $ARGV[5];
-$prototypes    =~ s/.*include\///g;
+$prototypes    =~ s/.*include\/uapi\//compel\/plugins\//g;
 my $bits       = $ARGV[6];
 
 my $codesdef   = $codes;
@@ -42,13 +42,13 @@ print PROTOSOUT <<"END";
 /* Autogenerated, don't edit */
 #ifndef $protosdef
 #define $protosdef
-#include "$prototypes"
-#include "$codes"
+#include <$prototypes>
+#include <$codes>
 END
 
 print ASMOUT <<"END";
 /* Autogenerated, don't edit */
-#include "$codes"
+#include <$codes>
 #include "$asmcommon"
 END
 
@@ -91,8 +91,8 @@ for (<IN>) {
 }
 
 if ($need_aux == 1) {
-	print ASMOUT   "#include \"uapi/std/syscall-aux.S\"\n";
-	print CODESOUT "#include \"uapi/std/syscall-aux.h\"\n";
+	print ASMOUT   "#include <compel/plugins/std/syscall-aux.S>\n";
+	print CODESOUT "#include <compel/plugins/std/syscall-aux.h>\n";
 }
 
 print CODESOUT  "#endif /* $codesdef */";
diff --git a/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls b/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls
index 65299cb1e53f..3a0d172ae8d5 100644
--- a/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls
+++ b/compel/arch/ppc64/plugins/std/syscalls/Makefile.syscalls
@@ -29,15 +29,15 @@ $(sys-proto): $(sys-def)
 	$(Q) echo "/* Autogenerated, don't edit */"							>  $@
 	$(Q) echo "#ifndef __ASM_CR_SYSCALL_PROTO_H__"							>> $@
 	$(Q) echo "#define __ASM_CR_SYSCALL_PROTO_H__"							>> $@
-	$(Q) echo "#include \"uapi/std/syscall-codes.h\""						>> $@
-	$(Q) echo "#include \"uapi/std/syscall-types.h\""						>> $@
+	$(Q) echo "#include <compel/plugins/std/syscall-codes.h>"					>> $@
+	$(Q) echo "#include <compel/plugins/std/syscall-types.h>"					>> $@
 	$(Q) cat $< | awk  '/^__NR/{print "extern long", $$3, substr($$0, index($$0,$$4)), ";"}'	>> $@
 	$(Q) echo "#endif /* __ASM_CR_SYSCALL_PROTO_H__ */"						>> $@
 
 $(sys-asm): $(sys-def) $(sys-asm-common) $(sys-codes) $(sys-proto)
 	$(E) "  GEN     " $@
 	$(Q) echo "/* Autogenerated, don't edit */"							>  $@
-	$(Q) echo "#include \"uapi/std/syscall-codes.h\""						>> $@
+	$(Q) echo "#include <compel/plugins/std/syscall-codes.h>"						>> $@
 	$(Q) echo "#include \"$(sys-asm-common-name)\""							>> $@
 	$(Q) cat $< | awk '/^__NR/{print "SYSCALL(", $$3, ",", $$2, ")"}'				>> $@
 
diff --git a/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls b/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
index 040d1e3b6ff5..522ee89fdd72 100644
--- a/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
+++ b/compel/arch/x86/plugins/std/syscalls/Makefile.syscalls
@@ -39,8 +39,8 @@ $(sys-proto): $(sys-def) $(sys-proto-types)
 	$(Q) echo "/* Autogenerated, don't edit */"					>  $$@
 	$(Q) echo "#ifndef ASM_SYSCALL_PROTO_H_$(1)__"					>> $$@
 	$(Q) echo "#define ASM_SYSCALL_PROTO_H_$(1)__"					>> $$@
-	$(Q) echo '#include "uapi/std/syscall-codes-$(1).h"'				>> $$@
-	$(Q) echo '#include "uapi/std/syscall-types.h"'					>> $$@
+	$(Q) echo '#include <compel/plugins/std/syscall-codes-$(1).h>'			>> $$@
+	$(Q) echo '#include <compel/plugins/std/syscall-types.h>'			>> $$@
 ifeq ($(1),32)
 	$(Q) echo '#include "asm/syscall32.h"'						>> $$@
 endif
@@ -53,7 +53,7 @@ define gen-rule-sys-asm
 $(sys-asm): $(sys-def) $(sys-asm-common) $(sys-codes) $(sys-proto) $(sys-proto-types)
 	$(call msg-gen, $$@)
 	$(Q) echo "/* Autogenerated, don't edit */"					>  $$@
-	$(Q) echo '#include "uapi/std/syscall-codes-$(1).h"'				>> $$@
+	$(Q) echo '#include <compel/plugins/std/syscall-codes-$(1).h>'			>> $$@
 	$(Q) echo '#include "$(sys-asm-common-name)"'					>> $$@
 	$(Q) cat $$< | awk '/^__NR/{print "SYSCALL(", $(AV)3, ",", $(AV)2, ")"}'	>> $$@
 endef
@@ -71,7 +71,7 @@ $(sys-codes-generic): $(PLUGIN_ARCH_DIR)/std/syscalls/syscall_32.tbl $(sys-proto
 	$(Q) echo "/* Autogenerated, don't edit */"			>  $@
 	$(Q) echo "#ifndef __ASM_CR_SYSCALL_CODES_H__"			>> $@
 	$(Q) echo "#define __ASM_CR_SYSCALL_CODES_H__"			>> $@
-	$(Q) echo '#include "uapi/std/syscall-codes-64.h"'		>> $@
+	$(Q) echo '#include <compel/plugins/std/syscall-codes-64.h>'	>> $@
 	$(Q) cat $< | awk '/^__NR/{NR32=$$1;				\
 		sub("^__NR", "__NR32", NR32);				\
 		print "\n#ifndef ", NR32;				\
@@ -87,9 +87,9 @@ $(sys-proto-generic): $(strip $(call map,sys-proto,$(sys-bits))) $(sys-proto-typ
 	$(Q) echo "#define __ASM_CR_SYSCALL_PROTO_H__"			>> $@
 	$(Q) echo ""							>> $@
 	$(Q) echo "#ifdef CONFIG_X86_32"				>> $@
-	$(Q) echo '#include "uapi/std/syscall-32.h"'			>> $@
+	$(Q) echo '#include <compel/plugins/std/syscall-32.h>'		>> $@
 	$(Q) echo "#else"						>> $@
-	$(Q) echo '#include "uapi/std/syscall-64.h"'			>> $@
+	$(Q) echo '#include <compel/plugins/std/syscall-64.h>'		>> $@
 	$(Q) echo "#endif /* CONFIG_X86_32 */"				>> $@
 	$(Q) echo ""							>> $@
 	$(Q) echo "#endif /* __ASM_CR_SYSCALL_PROTO_H__ */"		>> $@
diff --git a/compel/include/uapi/plugins b/compel/include/uapi/plugins
new file mode 120000
index 000000000000..7ff4c6055d3b
--- /dev/null
+++ b/compel/include/uapi/plugins
@@ -0,0 +1 @@
+../../plugins/include/uapi
\ No newline at end of file
diff --git a/compel/plugins/Makefile b/compel/plugins/Makefile
index ac54f7c2ec8a..dfbc812a52fc 100644
--- a/compel/plugins/Makefile
+++ b/compel/plugins/Makefile
@@ -6,6 +6,13 @@ PLUGIN_ARCH_DIR		:= compel/arch/$(ARCH)/plugins
 #
 # CFLAGS, ASFLAGS, LDFLAGS
 
+#
+# UAPI inclusion, referred as <compel/...>
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
+asflags-y		+= -I compel/include/uapi
+asflags-y		+= -I compel/plugins/include/uapi
+
 # General compel includes
 ccflags-y		+= -iquote $(SRC_DIR)/compel/include
 ccflags-y		+= -fno-stack-protector
diff --git a/compel/plugins/include/uapi/std/syscall-types.h b/compel/plugins/include/uapi/std/syscall-types.h
index 645b1ba0e491..119edb77e329 100644
--- a/compel/plugins/include/uapi/std/syscall-types.h
+++ b/compel/plugins/include/uapi/std/syscall-types.h
@@ -51,6 +51,6 @@ struct krlimit {
 /* Type of timers in the kernel.  */
 typedef int kernel_timer_t;
 
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 #endif /* COMPEL_SYSCALL_TYPES_H__ */
diff --git a/criu/Makefile b/criu/Makefile
index 5201022485df..f158325bf7e1 100644
--- a/criu/Makefile
+++ b/criu/Makefile
@@ -17,9 +17,8 @@ ccflags-y		+= -iquote $(SRC_DIR)/$(ARCH_DIR)
 ccflags-y		+= -iquote $(SRC_DIR)/$(ARCH_DIR)/include
 ccflags-y		+= -iquote $(SRC_DIR)/
 ccflags-y		+= -I/usr/include/libnl3
-ccflags-y		+= -iquote compel/plugins/include
-ccflags-y		+= -iquote compel/include
-ccflags-y		+= -iquote compel/arch/$(ARCH)/plugins/std
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 
 export ccflags-y
 
diff --git a/criu/Makefile.crtools b/criu/Makefile.crtools
index 452be2e29480..93df4ab4e7ef 100644
--- a/criu/Makefile.crtools
+++ b/criu/Makefile.crtools
@@ -1,7 +1,6 @@
 ccflags-y		+= -iquote criu/$(ARCH)
-ccflags-y		+= -iquote compel/plugins/include
-ccflags-y		+= -iquote compel/include
-ccflags-y		+= -iquote compel/arch/$(ARCH)/plugins/std
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 
 obj-y			+= infect.o
 obj-y			+= infect-rpc.o
diff --git a/criu/arch/aarch64/Makefile b/criu/arch/aarch64/Makefile
index 3b2643442153..2a718f5f0468 100644
--- a/criu/arch/aarch64/Makefile
+++ b/criu/arch/aarch64/Makefile
@@ -3,8 +3,8 @@ builtin-name		:= crtools.built-in.o
 ccflags-y		+= -iquote $(obj) -iquote $(SRC_DIR)
 ccflags-y		+= -iquote $(obj)/include -iquote $(SRC_DIR)/criu/include
 ccflags-y		+= -iquote $(SRC_DIR)/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/plugins/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/include
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 
 obj-y			+= cpu.o
 obj-y			+= crtools.o
diff --git a/criu/arch/aarch64/include/asm/types.h b/criu/arch/aarch64/include/asm/types.h
index 17353ac950f6..a84aea18e712 100644
--- a/criu/arch/aarch64/include/asm/types.h
+++ b/criu/arch/aarch64/include/asm/types.h
@@ -10,7 +10,7 @@
 #include "bitops.h"
 #include "asm/int.h"
 
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 #define core_is_compat(core)			false
 
diff --git a/criu/arch/aarch64/infect.c b/criu/arch/aarch64/infect.c
index 79f64d095071..067e558e0e80 100644
--- a/criu/arch/aarch64/infect.c
+++ b/criu/arch/aarch64/infect.c
@@ -3,7 +3,7 @@
 #include <sys/uio.h>
 #include <linux/elf.h>
 #include "asm/parasite-syscall.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "asm/types.h"
 #include "criu-log.h"
 #include "kerndat.h"
diff --git a/criu/arch/aarch64/restorer.c b/criu/arch/aarch64/restorer.c
index 8a206315ddc0..884bbff419f3 100644
--- a/criu/arch/aarch64/restorer.c
+++ b/criu/arch/aarch64/restorer.c
@@ -4,7 +4,7 @@
 #include "asm/restorer.h"
 #include "asm/string.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "log.h"
 #include "asm/fpu.h"
 #include "cpu.h"
diff --git a/criu/arch/aarch64/vdso-pie.c b/criu/arch/aarch64/vdso-pie.c
index 686b7f461f1d..e2dd2536f0cb 100644
--- a/criu/arch/aarch64/vdso-pie.c
+++ b/criu/arch/aarch64/vdso-pie.c
@@ -3,7 +3,7 @@
 #include "asm/string.h"
 #include "asm/types.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "parasite-vdso.h"
 #include "log.h"
 #include "common/bug.h"
diff --git a/criu/arch/arm/Makefile b/criu/arch/arm/Makefile
index bf26df0aad2b..2e89d67f6946 100644
--- a/criu/arch/arm/Makefile
+++ b/criu/arch/arm/Makefile
@@ -3,8 +3,8 @@ builtin-name		:= crtools.built-in.o
 ccflags-y		+= -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
 ccflags-y		+= -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
 
-ccflags-y		+= -iquote $(SRC_DIR)/compel/plugins/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/include
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 
 obj-y			+= cpu.o
 obj-y			+= crtools.o
diff --git a/criu/arch/arm/include/asm/types.h b/criu/arch/arm/include/asm/types.h
index e4dfd2cf148f..99543fa9ea27 100644
--- a/criu/arch/arm/include/asm/types.h
+++ b/criu/arch/arm/include/asm/types.h
@@ -9,7 +9,7 @@
 #include "bitops.h"
 #include "asm/int.h"
 
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 #define core_is_compat(core)			false
 
diff --git a/criu/arch/arm/infect.c b/criu/arch/arm/infect.c
index 1ad01472f30f..357d4492b293 100644
--- a/criu/arch/arm/infect.c
+++ b/criu/arch/arm/infect.c
@@ -1,7 +1,7 @@
 #include <sys/ptrace.h>
 #include <sys/types.h>
 #include "asm/parasite-syscall.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "asm/types.h"
 #include "criu-log.h"
 #include "kerndat.h"
diff --git a/criu/arch/arm/restorer.c b/criu/arch/arm/restorer.c
index ea9ae680547a..33f7e062446f 100644
--- a/criu/arch/arm/restorer.c
+++ b/criu/arch/arm/restorer.c
@@ -4,7 +4,7 @@
 #include "asm/restorer.h"
 #include "asm/string.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "log.h"
 #include "asm/fpu.h"
 #include "cpu.h"
diff --git a/criu/arch/ppc64/Makefile b/criu/arch/ppc64/Makefile
index abbb7ce6691e..cd7c41250a02 100644
--- a/criu/arch/ppc64/Makefile
+++ b/criu/arch/ppc64/Makefile
@@ -2,8 +2,8 @@ builtin-name		:= crtools.built-in.o
 
 ccflags-y		+= -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
 ccflags-y		+= -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/plugins/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/include
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 
 obj-y			+= cpu.o
 obj-y			+= crtools.o
diff --git a/criu/arch/ppc64/include/asm/types.h b/criu/arch/ppc64/include/asm/types.h
index 25e2125b27a6..a23d50035252 100644
--- a/criu/arch/ppc64/include/asm/types.h
+++ b/criu/arch/ppc64/include/asm/types.h
@@ -9,7 +9,7 @@
 #include "bitops.h"
 #include "asm/int.h"
 
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 typedef UserPpc64RegsEntry UserRegsEntry;
 
diff --git a/criu/arch/ppc64/infect.c b/criu/arch/ppc64/infect.c
index feefc1448572..d9a356a5e673 100644
--- a/criu/arch/ppc64/infect.c
+++ b/criu/arch/ppc64/infect.c
@@ -2,7 +2,7 @@
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <errno.h>
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "asm/types.h"
 #include "ptrace.h"
 #include "parasite-syscall.h"
diff --git a/criu/arch/ppc64/restorer.c b/criu/arch/ppc64/restorer.c
index 3f0aff87a5d4..4dda4bd1612d 100644
--- a/criu/arch/ppc64/restorer.c
+++ b/criu/arch/ppc64/restorer.c
@@ -4,7 +4,7 @@
 #include "asm/restorer.h"
 #include "asm/fpu.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "log.h"
 
 int restore_nonsigframe_gpregs(UserPpc64RegsEntry *r)
diff --git a/criu/arch/ppc64/vdso-pie.c b/criu/arch/ppc64/vdso-pie.c
index 58768ab8a00f..33f3dbd1a32e 100644
--- a/criu/arch/ppc64/vdso-pie.c
+++ b/criu/arch/ppc64/vdso-pie.c
@@ -3,7 +3,7 @@
 #include "asm/string.h"
 #include "asm/types.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "parasite-vdso.h"
 #include "log.h"
 #include "common/bug.h"
diff --git a/criu/arch/x86/Makefile b/criu/arch/x86/Makefile
index bffa3f52a800..fcbb6712941b 100644
--- a/criu/arch/x86/Makefile
+++ b/criu/arch/x86/Makefile
@@ -2,8 +2,8 @@ builtin-name		:= crtools.built-in.o
 
 ccflags-y		+= -iquote $(obj) -iquote $(SRC_DIR) -iquote $(obj)/include
 ccflags-y		+= -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/plugins/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/include
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 
 asflags-y		+= -Wstrict-prototypes -Wa,--noexecstack
 asflags-y		+= -D__ASSEMBLY__ -nostdlib -fomit-frame-pointer
diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
index 0f0aa899f2fb..438b88f29770 100644
--- a/criu/arch/x86/crtools.c
+++ b/criu/arch/x86/crtools.c
@@ -19,7 +19,7 @@
 #include "log.h"
 #include "util.h"
 #include "cpu.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "kerndat.h"
 #include "infect.h"
 
diff --git a/criu/arch/x86/include/asm/infect-types.h b/criu/arch/x86/include/asm/infect-types.h
index 39ddcb3394b7..dc574c304733 100644
--- a/criu/arch/x86/include/asm/infect-types.h
+++ b/criu/arch/x86/include/asm/infect-types.h
@@ -5,7 +5,7 @@
 #include <stdbool.h>
 #include <signal.h>
 #include "common/page.h"
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 #define SIGMAX			64
 #define SIGMAX_OLD		31
diff --git a/criu/arch/x86/include/asm/restorer.h b/criu/arch/x86/include/asm/restorer.h
index a421e008c6d3..3951e7cc0a3d 100644
--- a/criu/arch/x86/include/asm/restorer.h
+++ b/criu/arch/x86/include/asm/restorer.h
@@ -4,7 +4,7 @@
 #include "asm/types.h"
 #include "asm/fpu.h"
 #include "images/core.pb-c.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 
 #include "sigframe.h"
 
diff --git a/criu/arch/x86/include/asm/types.h b/criu/arch/x86/include/asm/types.h
index 91313078765c..0794f14b806a 100644
--- a/criu/arch/x86/include/asm/types.h
+++ b/criu/arch/x86/include/asm/types.h
@@ -8,7 +8,7 @@
 #include "bitops.h"
 #include "asm/int.h"
 
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 #include "log.h"
 #include "common/bug.h"
diff --git a/criu/arch/x86/infect.c b/criu/arch/x86/infect.c
index 21511438e7a2..748be1cd9e18 100644
--- a/criu/arch/x86/infect.c
+++ b/criu/arch/x86/infect.c
@@ -11,8 +11,8 @@
 
 #include "compel/include/asm/processor-flags.h"
 #include "compel/include/errno.h"
-#include "uapi/std/syscall-codes.h"
-#include "compel/include/asm/syscall.h"
+#include <compel/plugins/std/syscall-codes.h>
+#include <compel/plugins/std/syscall.h>
 #include "compel/include/asm/ptrace.h"
 #include "common/err.h"
 #include "asm/infect-types.h"
diff --git a/criu/arch/x86/restorer.c b/criu/arch/x86/restorer.c
index 052d91a67ad2..01ed669e597c 100644
--- a/criu/arch/x86/restorer.c
+++ b/criu/arch/x86/restorer.c
@@ -7,7 +7,7 @@
 #include "asm/fpu.h"
 #include "asm/string.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "log.h"
 #include "cpu.h"
 
diff --git a/criu/arch/x86/sigaction_compat.c b/criu/arch/x86/sigaction_compat.c
index 214b2058bf63..af723469636f 100644
--- a/criu/arch/x86/sigaction_compat.c
+++ b/criu/arch/x86/sigaction_compat.c
@@ -5,7 +5,7 @@
 #include <sys/mman.h>
 
 #ifdef CR_NOGLIBC
-# include "uapi/std/syscall.h"
+# include <compel/plugins/std/syscall.h>
 #else
 # define sys_mmap mmap
 # define sys_munmap munmap
diff --git a/criu/arch/x86/vdso-pie.c b/criu/arch/x86/vdso-pie.c
index 2e2041b3ac1a..63f8d8d0d8ee 100644
--- a/criu/arch/x86/vdso-pie.c
+++ b/criu/arch/x86/vdso-pie.c
@@ -3,7 +3,7 @@
 #include "asm/string.h"
 #include "asm/types.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "parasite-vdso.h"
 #include "log.h"
 #include "common/bug.h"
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index d96875138d2d..e1d6ef627c13 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -80,7 +80,7 @@
 
 #include "parasite-syscall.h"
 #include "files-reg.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "compel/include/asm/syscall.h"
 
 #include "protobuf.h"
diff --git a/criu/fsnotify.c b/criu/fsnotify.c
index 421f3d57792e..b1b495db361a 100644
--- a/criu/fsnotify.c
+++ b/criu/fsnotify.c
@@ -41,7 +41,7 @@
 #include "namespaces.h"
 #include "pstree.h"
 #include "fault-injection.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 
 #include "protobuf.h"
 #include "images/fsnotify.pb-c.h"
diff --git a/criu/include/infect.h b/criu/include/infect.h
index f1692c29dc4b..2db90e6183c8 100644
--- a/criu/include/infect.h
+++ b/criu/include/infect.h
@@ -2,7 +2,7 @@
 #define __COMPEL_INFECT_H__
 
 #include "asm/infect-types.h"
-#include "compel/include/uapi/ksigset.h"
+#include <compel/ksigset.h>
 
 #define PARASITE_START_AREA_MIN	(4096)
 
diff --git a/criu/include/lock.h b/criu/include/lock.h
index 0a9921186d52..e73ff9171759 100644
--- a/criu/include/lock.h
+++ b/criu/include/lock.h
@@ -15,7 +15,7 @@
 #define LOCK_BUG()	LOCK_BUG_ON(1)
 
 #ifdef CR_NOGLIBC
-# include "uapi/std/syscall.h"
+# include <compel/plugins/std/syscall.h>
 #else
 # include <unistd.h>
 # include <sys/syscall.h>
diff --git a/criu/include/sigframe-common.h b/criu/include/sigframe-common.h
index 9d5131c627e5..0796bb374987 100644
--- a/criu/include/sigframe-common.h
+++ b/criu/include/sigframe-common.h
@@ -9,7 +9,7 @@
 #endif
 
 #include <signal.h>
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/asm/syscall-types.h>
 
 struct rt_sigframe;
 
diff --git a/criu/infect.c b/criu/infect.c
index dff9d31444a4..d4e9d35790a9 100644
--- a/criu/infect.c
+++ b/criu/infect.c
@@ -16,8 +16,8 @@
 #include "common/xmalloc.h"
 #include "lock.h"
 
-#include "uapi/std/syscall-codes.h"
-#include "uapi/std/asm/syscall-types.h"
+#include <compel/plugins/std/syscall-codes.h>
+#include <compel/plugins/std/asm/syscall-types.h>
 #include "compel/include/asm/ptrace.h"
 #include "compel/include/asm/syscall.h"
 #include "asm/sigframe.h"
diff --git a/criu/kerndat.c b/criu/kerndat.c
index 0a2e5c2a95e9..fc73b535cad1 100644
--- a/criu/kerndat.c
+++ b/criu/kerndat.c
@@ -21,7 +21,7 @@
 #include "lsm.h"
 #include "proc_parse.h"
 #include "config.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 
 struct kerndat_s kdat = {
 };
diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index 94f5df49163b..970ab45cafa6 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -29,7 +29,7 @@
 #include "proc_parse.h"
 #include "aio.h"
 #include "fault-injection.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "signal.h"
 #include "sigframe.h"
 
diff --git a/criu/pie/Makefile b/criu/pie/Makefile
index f8124b8d931e..eb41415d944a 100644
--- a/criu/pie/Makefile
+++ b/criu/pie/Makefile
@@ -46,14 +46,13 @@ target			+= $(parasite_target) restorer
 #
 CFLAGS			:= $(filter-out -pg $(CFLAGS-GCOV),$(CFLAGS))
 CFLAGS			:= $(filter-out -DCONFIG_X86_64,$(CFLAGS))
-CFLAGS			+= -iquote $(SRC_DIR)/compel/include
 CFLAGS			+= -iquote $(SRC_DIR)/criu/arch/$(ARCH)/include
 CFLAGS			+= -iquote $(SRC_DIR)/criu/include
 CFLAGS			+= -iquote $(SRC_DIR)/include
 CFLAGS			+= -iquote $(SRC_DIR)
 
-ccflags-y		+= -iquote $(SRC_DIR)/compel/plugins/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/include
+ccflags-y		+= -I compel/include/uapi
+ccflags-y		+= -I compel/plugins/include/uapi
 ccflags-y		+= -DCR_NOGLIBC
 ifneq ($(filter-out clean mrproper,$(MAKECMDGOALS)),)
 NATIVE_CFLAGS		:= $(shell $(SRC_DIR)/compel/compel-host --arch=$(ARCH) cflags)
diff --git a/criu/pie/Makefile.library b/criu/pie/Makefile.library
index 70378ba738ae..007823124150 100644
--- a/criu/pie/Makefile.library
+++ b/criu/pie/Makefile.library
@@ -61,8 +61,8 @@ iquotes			+= -iquote $(SRC_DIR)/$(ARCH_DIR)/include
 iquotes			+= -iquote $(SRC_DIR) -iquote $(SRC_DIR)/criu/include -iquote $(SRC_DIR)/include
 CFLAGS			:= $(filter-out -pg $(CFLAGS-GCOV),$(CFLAGS)) $(iquotes)
 asflags-y		:= -D__ASSEMBLY__ $(iquotes)
-ccflags-y		+= -iquote $(SRC_DIR)/compel/plugins/include
-ccflags-y		+= -iquote $(SRC_DIR)/compel/include
+ccflags-y		+= -I compel/plugins/include/uapi
+ccflags-y		+= -I compel/include/uapi
 
 ifeq ($(SRCARCH),arm)
 	ccflags-y	+= -marm
diff --git a/criu/pie/log-simple.c b/criu/pie/log-simple.c
index 8d48aa6d3394..c83cc0a7ca46 100644
--- a/criu/pie/log-simple.c
+++ b/criu/pie/log-simple.c
@@ -1,7 +1,7 @@
 #include <stdarg.h>
 
 #include "common/bitsperlong.h"
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "log.h"
 
 struct simple_buf {
diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c
index bd94bf2ff12c..415c40e0e801 100644
--- a/criu/pie/parasite-vdso.c
+++ b/criu/pie/parasite-vdso.c
@@ -11,7 +11,7 @@
 
 #include "page.h"
 
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "image.h"
 #include "parasite-vdso.h"
 #include "vma.h"
diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c
index 433493e3b3b4..120c80ca5da7 100644
--- a/criu/pie/parasite.c
+++ b/criu/pie/parasite.c
@@ -8,7 +8,7 @@
 #include <sys/ioctl.h>
 
 #include "types.h"
-#include "uapi/std/syscall.h"
+#include <compel/plugins/std/syscall.h>
 #include "parasite.h"
 #include "config.h"
 #include "fcntl.h"
diff --git a/criu/pie/pie-relocs.c b/criu/pie/pie-relocs.c
index eac507b55266..f0802a0a2ab0 100644
--- a/criu/pie/pie-relocs.c
+++ b/criu/pie/pie-relocs.c
@@ -17,7 +17,7 @@
 #include "log.h"
 
 #include "common/compiler.h"
-#include "compel/include/uapi/compel.h"
+#include <compel/compel.h>
 #include "common/bug.h"
 
 __maybe_unused void elf_relocs_apply(void *mem, void *vbase, size_t size, compel_reloc_t *elf_relocs, size_t nr_relocs)
diff --git a/criu/pie/pie-relocs.h b/criu/pie/pie-relocs.h
index 1cabfe1d9dba..2fc5f6a339ae 100644
--- a/criu/pie/pie-relocs.h
+++ b/criu/pie/pie-relocs.h
@@ -1,7 +1,7 @@
 #ifndef __PIE_RELOCS_H__
 #define __PIE_RELOCS_H__
 
-#include "compel/include/uapi/compel.h"
+#include <compel/compel.h>
 
 #include "common/compiler.h"
 #include "config.h"
diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c
index 9573292ee318..c3425222182d 100644
--- a/criu/pie/restorer.c
+++ b/criu/pie/restorer.c
@@ -21,8 +21,8 @@
 
 #include "common/compiler.h"
 #include "string.h"
-#include "uapi/std/syscall.h"
-#include "uapi/ksigset.h"
+#include <compel/plugins/std/syscall.h>
+#include <compel/ksigset.h>
 #include "signal.h"
 #include "config.h"
 #include "prctl.h"
diff --git a/criu/pie/util-fd.c b/criu/pie/util-fd.c
index 8e4b596a967a..16204a947c3d 100644
--- a/criu/pie/util-fd.c
+++ b/criu/pie/util-fd.c
@@ -10,7 +10,7 @@
 #include "string.h"
 
 #ifdef CR_NOGLIBC
-# include "uapi/std/syscall.h"
+# include <compel/plugins/std/syscall.h>
 # define __sys(foo)	sys_##foo
 #else
 # define __sys(foo)	foo
diff --git a/criu/pie/util.c b/criu/pie/util.c
index 598d294109b2..f72ebe971b44 100644
--- a/criu/pie/util.c
+++ b/criu/pie/util.c
@@ -12,7 +12,7 @@
 #include "util-pie.h"
 
 #ifdef CR_NOGLIBC
-# include "uapi/std/syscall.h"
+# include <compel/plugins/std/syscall.h>
 # define __sys(foo)     sys_##foo
 #else
 # define __sys(foo)     foo
diff --git a/criu/shmem.c b/criu/shmem.c
index 5065abd89c26..60e1f6efb1ec 100644
--- a/criu/shmem.c
+++ b/criu/shmem.c
@@ -16,7 +16,7 @@
 #include "vma.h"
 #include "mem.h"
 #include "config.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "bitops.h"
 #include "log.h"
 #include "page.h"
diff --git a/criu/uffd.c b/criu/uffd.c
index e6d40696b47c..c96a8185373c 100644
--- a/criu/uffd.c
+++ b/criu/uffd.c
@@ -33,7 +33,7 @@
 #include "crtools.h"
 #include "cr_options.h"
 #include "xmalloc.h"
-#include "uapi/std/syscall-codes.h"
+#include <compel/plugins/std/syscall-codes.h>
 #include "restorer.h"
 #include "page-xfer.h"
 #include "lock.h"
-- 
2.7.4



More information about the CRIU mailing list