From a0810481e571a22bffe27120a9d73fb9b0d7f8d8 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 27 Oct 2016 19:01:21 +0300 Subject: [PATCH] compel: Include compel headers as system ones Signed-off-by: Cyrill Gorcunov Signed-off-by: Andrei Vagin --- Makefile.compel | 20 +++++++++++++------ compel/Makefile | 5 +++++ .../arm/plugins/std/syscalls/gen-syscalls.pl | 16 +++++++-------- .../plugins/std/syscalls/Makefile.syscalls | 6 +++--- .../plugins/std/syscalls/Makefile.syscalls | 12 +++++------ compel/include/uapi/plugins | 1 + compel/plugins/Makefile | 7 +++++++ .../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 | 5 +++-- 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/sigframe-common.h | 3 +-- 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 +- include/common/lock.h | 2 +- 52 files changed, 101 insertions(+), 83 deletions(-) create mode 120000 compel/include/uapi/plugins diff --git a/Makefile.compel b/Makefile.compel index a5999581b..84d5c0769 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 8fcfcff67..2cc11f7fb 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 +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 c683e4998..a0942114d 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 () { } 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 \n"; + print CODESOUT "#include \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 65299cb1e..3a0d172ae 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 " >> $@ + $(Q) echo "#include " >> $@ $(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 " >> $@ $(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 040d1e3b6..522ee89fd 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 ' >> $$@ + $(Q) echo '#include ' >> $$@ 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 ' >> $$@ $(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 ' >> $@ $(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 ' >> $@ $(Q) echo "#else" >> $@ - $(Q) echo '#include "uapi/std/syscall-64.h"' >> $@ + $(Q) echo '#include ' >> $@ $(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 000000000..7ff4c6055 --- /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 ac54f7c2e..dfbc812a5 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 +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 645b1ba0e..119edb77e 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 #endif /* COMPEL_SYSCALL_TYPES_H__ */ diff --git a/criu/Makefile b/criu/Makefile index 2b0989a57..35febd8e8 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 502f33133..278760b54 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 065a1fb75..e269de4c8 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 asflags-y += -D__ASSEMBLY__ obj-y += cpu.o diff --git a/criu/arch/aarch64/include/asm/types.h b/criu/arch/aarch64/include/asm/types.h index 17353ac95..a84aea18e 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 #define core_is_compat(core) false diff --git a/criu/arch/aarch64/infect.c b/criu/arch/aarch64/infect.c index 79f64d095..067e558e0 100644 --- a/criu/arch/aarch64/infect.c +++ b/criu/arch/aarch64/infect.c @@ -3,7 +3,7 @@ #include #include #include "asm/parasite-syscall.h" -#include "uapi/std/syscall-codes.h" +#include #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 72c9c4a97..69f7dbe1e 100644 --- a/criu/arch/aarch64/restorer.c +++ b/criu/arch/aarch64/restorer.c @@ -3,7 +3,7 @@ #include "restorer.h" #include "asm/restorer.h" -#include "uapi/std/syscall.h" +#include #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 8612b2622..55de8cb08 100644 --- a/criu/arch/aarch64/vdso-pie.c +++ b/criu/arch/aarch64/vdso-pie.c @@ -2,7 +2,7 @@ #include "asm/types.h" -#include "uapi/std/syscall.h" +#include #include "parasite-vdso.h" #include "log.h" #include "common/bug.h" diff --git a/criu/arch/arm/Makefile b/criu/arch/arm/Makefile index cb725c5d9..da513ebca 100644 --- a/criu/arch/arm/Makefile +++ b/criu/arch/arm/Makefile @@ -2,8 +2,9 @@ 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 += -D__ASSEMBLY__ diff --git a/criu/arch/arm/include/asm/types.h b/criu/arch/arm/include/asm/types.h index e4dfd2cf1..99543fa9e 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 #define core_is_compat(core) false diff --git a/criu/arch/arm/infect.c b/criu/arch/arm/infect.c index 1ad01472f..357d4492b 100644 --- a/criu/arch/arm/infect.c +++ b/criu/arch/arm/infect.c @@ -1,7 +1,7 @@ #include #include #include "asm/parasite-syscall.h" -#include "uapi/std/syscall-codes.h" +#include #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 8eb18a8ad..fe206e1a7 100644 --- a/criu/arch/arm/restorer.c +++ b/criu/arch/arm/restorer.c @@ -3,7 +3,7 @@ #include "restorer.h" #include "asm/restorer.h" -#include "uapi/std/syscall.h" +#include #include "log.h" #include "asm/fpu.h" #include "cpu.h" diff --git a/criu/arch/ppc64/Makefile b/criu/arch/ppc64/Makefile index abbb7ce66..cd7c41250 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 25e2125b2..a23d50035 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 typedef UserPpc64RegsEntry UserRegsEntry; diff --git a/criu/arch/ppc64/infect.c b/criu/arch/ppc64/infect.c index feefc1448..d9a356a5e 100644 --- a/criu/arch/ppc64/infect.c +++ b/criu/arch/ppc64/infect.c @@ -2,7 +2,7 @@ #include #include #include -#include "uapi/std/syscall-codes.h" +#include #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 3f0aff87a..4dda4bd16 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 #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 fbca7f51a..2c46c1613 100644 --- a/criu/arch/ppc64/vdso-pie.c +++ b/criu/arch/ppc64/vdso-pie.c @@ -3,7 +3,7 @@ #include "asm/types.h" -#include "uapi/std/syscall.h" +#include #include "parasite-vdso.h" #include "log.h" #include "common/bug.h" diff --git a/criu/arch/x86/Makefile b/criu/arch/x86/Makefile index bffa3f52a..fcbb67129 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 01fcfed45..32508367d 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 #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 65fc3d997..bbc6bcf22 100644 --- a/criu/arch/x86/include/asm/infect-types.h +++ b/criu/arch/x86/include/asm/infect-types.h @@ -7,7 +7,7 @@ #include "log.h" #include "common/bug.h" #include "common/page.h" -#include "syscall-types.h" +#include #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 43a1b6989..e70526089 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 #include "sigframe.h" diff --git a/criu/arch/x86/include/asm/types.h b/criu/arch/x86/include/asm/types.h index 84a29ec12..dbf284035 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 #include "images/core.pb-c.h" diff --git a/criu/arch/x86/infect.c b/criu/arch/x86/infect.c index 10f319391..fe9d581bb 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 +#include #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 052d91a67..01ed669e5 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 #include "log.h" #include "cpu.h" diff --git a/criu/arch/x86/sigaction_compat.c b/criu/arch/x86/sigaction_compat.c index 214b2058b..af7234696 100644 --- a/criu/arch/x86/sigaction_compat.c +++ b/criu/arch/x86/sigaction_compat.c @@ -5,7 +5,7 @@ #include #ifdef CR_NOGLIBC -# include "uapi/std/syscall.h" +# include #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 07652d2fd..990a2771f 100644 --- a/criu/arch/x86/vdso-pie.c +++ b/criu/arch/x86/vdso-pie.c @@ -3,7 +3,7 @@ #include "string.h" #include "asm/types.h" -#include "uapi/std/syscall.h" +#include #include "parasite-vdso.h" #include "log.h" #include "common/bug.h" diff --git a/criu/cr-restore.c b/criu/cr-restore.c index b9e9827ee..2ec4d0bcc 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 #include "compel/include/asm/syscall.h" #include "protobuf.h" diff --git a/criu/fsnotify.c b/criu/fsnotify.c index 9a591a625..0dcb07c7c 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 #include "protobuf.h" #include "images/fsnotify.pb-c.h" diff --git a/criu/include/infect.h b/criu/include/infect.h index f1692c29d..2db90e618 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 #define PARASITE_START_AREA_MIN (4096) diff --git a/criu/include/sigframe-common.h b/criu/include/sigframe-common.h index a714467dc..0796bb374 100644 --- a/criu/include/sigframe-common.h +++ b/criu/include/sigframe-common.h @@ -9,8 +9,7 @@ #endif #include -#include "syscall-types.h" -#include "asm/types.h" +#include struct rt_sigframe; diff --git a/criu/infect.c b/criu/infect.c index 1f1a5c59a..bea009e85 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 +#include #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 f3c654a39..9f7eb0fd7 100644 --- a/criu/kerndat.c +++ b/criu/kerndat.c @@ -27,7 +27,7 @@ #include "proc_parse.h" #include "config.h" #include "sk-inet.h" -#include "uapi/std/syscall-codes.h" +#include struct kerndat_s kdat = { }; diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c index 0a8d6fe68..3bec47554 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 #include "signal.h" #include "sigframe.h" diff --git a/criu/pie/Makefile b/criu/pie/Makefile index 040a68cd0..0c764170f 100644 --- a/criu/pie/Makefile +++ b/criu/pie/Makefile @@ -46,7 +46,6 @@ 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 @@ -54,8 +53,8 @@ CFLAGS += -iquote $(SRC_DIR) CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 CFLAGS += -Wp,-U_FORTIFY_SOURCE -Wp,-D_FORTIFY_SOURCE=0 -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 1b408d14c..a76ee4b35 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 3f8a73623..f54bb0133 100644 --- a/criu/pie/log-simple.c +++ b/criu/pie/log-simple.c @@ -4,7 +4,7 @@ #include "types.h" #include "string.h" #include "common/bitsperlong.h" -#include "uapi/std/syscall.h" +#include #include "log.h" struct simple_buf { diff --git a/criu/pie/parasite-vdso.c b/criu/pie/parasite-vdso.c index 7914de6f6..601c37f68 100644 --- a/criu/pie/parasite-vdso.c +++ b/criu/pie/parasite-vdso.c @@ -12,7 +12,7 @@ #include "int.h" #include "types.h" #include "page.h" -#include "uapi/std/syscall.h" +#include #include "image.h" #include "parasite-vdso.h" #include "vma.h" diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c index 66dd6cd2f..8e1fdf8d4 100644 --- a/criu/pie/parasite.c +++ b/criu/pie/parasite.c @@ -9,7 +9,7 @@ #include "int.h" #include "types.h" -#include "uapi/std/syscall.h" +#include #include "parasite.h" #include "config.h" #include "fcntl.h" diff --git a/criu/pie/pie-relocs.c b/criu/pie/pie-relocs.c index eac507b55..f0802a0a2 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 #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 1cabfe1d9..2fc5f6a33 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 #include "common/compiler.h" #include "config.h" diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c index 884749f3b..edcc1934e 100644 --- a/criu/pie/restorer.c +++ b/criu/pie/restorer.c @@ -21,8 +21,8 @@ #include "types.h" #include "common/compiler.h" #include "string.h" -#include "uapi/std/syscall.h" -#include "uapi/ksigset.h" +#include +#include #include "signal.h" #include "config.h" #include "prctl.h" diff --git a/criu/pie/util-fd.c b/criu/pie/util-fd.c index 0e6291f9d..df7daea6f 100644 --- a/criu/pie/util-fd.c +++ b/criu/pie/util-fd.c @@ -11,7 +11,7 @@ #include "string.h" #ifdef CR_NOGLIBC -# include "uapi/std/syscall.h" +# include # define __sys(foo) sys_##foo # define __sys_err(ret) ret #else diff --git a/criu/pie/util.c b/criu/pie/util.c index ed2949745..4945483f6 100644 --- a/criu/pie/util.c +++ b/criu/pie/util.c @@ -13,7 +13,7 @@ #include "util-pie.h" #ifdef CR_NOGLIBC -# include "uapi/std/syscall.h" +# include # define __sys(foo) sys_##foo #else # define __sys(foo) foo diff --git a/criu/shmem.c b/criu/shmem.c index 997c20f36..a0821413d 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 #include "bitops.h" #include "log.h" #include "types.h" diff --git a/include/common/lock.h b/include/common/lock.h index bcd1145f0..4782b638f 100644 --- a/include/common/lock.h +++ b/include/common/lock.h @@ -15,7 +15,7 @@ #define LOCK_BUG() LOCK_BUG_ON(1) #ifdef CR_NOGLIBC -# include "uapi/std/syscall.h" +# include #else # include # include