diff --git a/.gitignore b/.gitignore index d1725af2d..048668905 100644 --- a/.gitignore +++ b/.gitignore @@ -28,10 +28,8 @@ criu/arch/*/sys-exec-tbl*.c # x86 syscalls-table is not generated !criu/arch/x86/sys-exec-tbl.c criu/arch/*/syscalls*.S -criu/include/config.h criu/include/syscall-codes*.h criu/include/syscall*.h -soccr/config.h criu/include/version.h criu/pie/restorer-blob.h criu/pie/parasite-blob.h @@ -42,3 +40,4 @@ scripts/build/qemu-user-static/* lib/.crit-setup.files compel/include/asm include/common/asm +include/common/config.h diff --git a/Makefile b/Makefile index 9610151f9..75f328e50 100644 --- a/Makefile +++ b/Makefile @@ -181,7 +181,7 @@ criu-deps += include/common/asm # # Configure variables. -export CONFIG_HEADER := criu/include/config.h +export CONFIG_HEADER := include/common/config.h ifeq ($(filter tags etags cscope clean mrproper,$(MAKECMDGOALS)),) include Makefile.config else @@ -203,13 +203,10 @@ include Makefile.compel # Next the socket CR library # SOCCR_A := soccr/libsoccr.a -SOCCR_CONFIG := soccr/config.h -$(SOCCR_CONFIG): $(CONFIG_HEADER) - $(Q) test -f $@ || ln -s ../$(CONFIG_HEADER) $@ soccr/Makefile: ; -soccr/%: $(SOCCR_CONFIG) .FORCE +soccr/%: $(CONFIG_HEADER) .FORCE $(Q) $(MAKE) $(build)=soccr $@ -soccr/built-in.o: $(SOCCR_CONFIG) .FORCE +soccr/built-in.o: $(CONFIG_HEADER) .FORCE $(Q) $(MAKE) $(build)=soccr all $(SOCCR_A): |soccr/built-in.o criu-deps += $(SOCCR_A) @@ -262,7 +259,6 @@ clean: clean-top mrproper-top: clean-top $(Q) $(RM) $(CONFIG_HEADER) - $(Q) $(RM) $(SOCCR_CONFIG) $(Q) $(RM) $(VERSION_HEADER) $(Q) $(RM) $(COMPEL_VERSION_HEADER) $(Q) $(RM) include/common/asm diff --git a/criu/cgroup-props.c b/criu/cgroup-props.c index 251c4631e..f7032bd7e 100644 --- a/criu/cgroup-props.c +++ b/criu/cgroup-props.c @@ -9,10 +9,10 @@ #include #include "int.h" +#include "common/config.h" #include "common/compiler.h" #include "cgroup-props.h" #include "cr_options.h" -#include "config.h" #include "xmalloc.h" #include "string.h" #include "util.h" diff --git a/criu/filesystems.c b/criu/filesystems.c index 8211e396a..5a88788d7 100644 --- a/criu/filesystems.c +++ b/criu/filesystems.c @@ -4,7 +4,7 @@ #include #include -#include "config.h" +#include "common/config.h" #include "int.h" #include "common/compiler.h" #include "xmalloc.h" diff --git a/criu/include/cr_options.h b/criu/include/cr_options.h index af530e9be..8f09fd903 100644 --- a/criu/include/cr_options.h +++ b/criu/include/cr_options.h @@ -2,7 +2,7 @@ #define __CR_OPTIONS_H__ #include -#include "config.h" +#include "common/config.h" #include "common/list.h" /* diff --git a/criu/include/kerndat.h b/criu/include/kerndat.h index 950755b5e..6ad77e369 100644 --- a/criu/include/kerndat.h +++ b/criu/include/kerndat.h @@ -4,7 +4,7 @@ #include #include "int.h" -#include "config.h" +#include "common/config.h" #ifdef CONFIG_VDSO #include "util-vdso.h" #endif diff --git a/criu/include/parasite-syscall.h b/criu/include/parasite-syscall.h index 7a09d105e..c9438a6fe 100644 --- a/criu/include/parasite-syscall.h +++ b/criu/include/parasite-syscall.h @@ -3,7 +3,7 @@ #include "pid.h" #include "common/list.h" -#include "config.h" +#include "common/config.h" #include "asm/parasite-syscall.h" struct parasite_dump_thread; diff --git a/criu/include/parasite-vdso.h b/criu/include/parasite-vdso.h index 3d6585a01..6667fe5c4 100644 --- a/criu/include/parasite-vdso.h +++ b/criu/include/parasite-vdso.h @@ -1,7 +1,7 @@ #ifndef __CR_PARASITE_VDSO_H__ #define __CR_PARASITE_VDSO_H__ -#include "config.h" +#include "common/config.h" #ifdef CONFIG_VDSO diff --git a/criu/include/ptrace-compat.h b/criu/include/ptrace-compat.h index b23df2dfd..476da3536 100644 --- a/criu/include/ptrace-compat.h +++ b/criu/include/ptrace-compat.h @@ -3,7 +3,7 @@ #include #include -#include "config.h" +#include "common/config.h" #ifndef CONFIG_HAS_PTRACE_PEEKSIGINFO struct ptrace_peeksiginfo_args { diff --git a/criu/include/restorer.h b/criu/include/restorer.h index 6e1c78579..be1b5d7f2 100644 --- a/criu/include/restorer.h +++ b/criu/include/restorer.h @@ -5,6 +5,7 @@ #include #include +#include "common/config.h" #include "types.h" #include "int.h" #include "types.h" @@ -13,7 +14,6 @@ #include "common/lock.h" #include "util.h" #include "asm/restorer.h" -#include "config.h" #include "posix-timer.h" #include "timerfd.h" #include "shmem.h" diff --git a/criu/include/string.h b/criu/include/string.h index f9b4a3828..bc5f9d219 100644 --- a/criu/include/string.h +++ b/criu/include/string.h @@ -7,7 +7,7 @@ # include #endif -#include "config.h" +#include "common/config.h" #ifndef CONFIG_HAS_STRLCPY extern size_t strlcpy(char *dest, const char *src, size_t size); diff --git a/criu/include/vdso.h b/criu/include/vdso.h index 3c4c0ecbd..1719f3fb7 100644 --- a/criu/include/vdso.h +++ b/criu/include/vdso.h @@ -4,7 +4,7 @@ #include #include -#include "config.h" +#include "common/config.h" #ifdef CONFIG_VDSO diff --git a/criu/kerndat.c b/criu/kerndat.c index ea4d2a162..164f6cc4b 100644 --- a/criu/kerndat.c +++ b/criu/kerndat.c @@ -13,6 +13,7 @@ #include /* for sockaddr_in and inet_ntoa() */ #include +#include "common/config.h" #include "int.h" #include "log.h" #include "restorer.h" @@ -25,7 +26,6 @@ #include "util.h" #include "lsm.h" #include "proc_parse.h" -#include "config.h" #include "sk-inet.h" #include #include diff --git a/criu/lsm.c b/criu/lsm.c index 2d77f6277..fd098581f 100644 --- a/criu/lsm.c +++ b/criu/lsm.c @@ -5,8 +5,8 @@ #include #include +#include "common/config.h" #include "kerndat.h" -#include "config.h" #include "pstree.h" #include "util.h" #include "cr_options.h" diff --git a/criu/page-pipe.c b/criu/page-pipe.c index 518248aaf..7da8bebc3 100644 --- a/criu/page-pipe.c +++ b/criu/page-pipe.c @@ -3,8 +3,8 @@ #undef LOG_PREFIX #define LOG_PREFIX "page-pipe: " +#include "common/config.h" #include "page.h" -#include "config.h" #include "util.h" #include "criu-log.h" #include "page-pipe.h" diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c index 8ace6ad66..1fd9142e5 100644 --- a/criu/parasite-syscall.c +++ b/criu/parasite-syscall.c @@ -5,6 +5,7 @@ #include #include +#include "common/config.h" #include "common/compiler.h" #include "types.h" #include "protobuf.h" @@ -20,7 +21,6 @@ #include "crtools.h" #include "namespaces.h" #include "kerndat.h" -#include "config.h" #include "pstree.h" #include "posix-timer.h" #include "mem.h" diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c index f3fa2e39a..db2a75f59 100644 --- a/criu/pie/parasite.c +++ b/criu/pie/parasite.c @@ -7,11 +7,11 @@ #include #include +#include "common/config.h" #include "int.h" #include "types.h" #include #include "parasite.h" -#include "config.h" #include "fcntl.h" #include "prctl.h" #include "common/lock.h" diff --git a/criu/pie/pie-relocs.h b/criu/pie/pie-relocs.h index 5a18d8c9d..6797486c2 100644 --- a/criu/pie/pie-relocs.h +++ b/criu/pie/pie-relocs.h @@ -3,8 +3,8 @@ #include +#include "common/config.h" #include "common/compiler.h" -#include "config.h" #define pie_size(__pie_name) (round_up(sizeof(__pie_name##_blob) + \ __pie_name ## _nr_gotpcrel * sizeof(long), page_size())) diff --git a/criu/pie/restorer.c b/criu/pie/restorer.c index 48b064d95..c2e5b38a5 100644 --- a/criu/pie/restorer.c +++ b/criu/pie/restorer.c @@ -19,6 +19,7 @@ #include "linux/userfaultfd.h" +#include "common/config.h" #include "int.h" #include "types.h" #include "common/compiler.h" @@ -26,7 +27,6 @@ #include #include #include "signal.h" -#include "config.h" #include "prctl.h" #include "criu-log.h" #include "util.h" diff --git a/criu/seccomp.c b/criu/seccomp.c index c5e7a7d93..6416e793c 100644 --- a/criu/seccomp.c +++ b/criu/seccomp.c @@ -3,7 +3,7 @@ #include #include -#include "config.h" +#include "common/config.h" #include "imgset.h" #include "kcmp.h" #include "pstree.h" diff --git a/criu/shmem.c b/criu/shmem.c index 5314cb504..895297f0b 100644 --- a/criu/shmem.c +++ b/criu/shmem.c @@ -4,6 +4,7 @@ #include #include +#include "common/config.h" #include "common/list.h" #include "pid.h" #include "shmem.h" @@ -15,7 +16,6 @@ #include "rst-malloc.h" #include "vma.h" #include "mem.h" -#include "config.h" #include #include "bitops.h" #include "log.h" diff --git a/criu/sk-tcp.c b/criu/sk-tcp.c index 5fe93ab0a..9c73d882f 100644 --- a/criu/sk-tcp.c +++ b/criu/sk-tcp.c @@ -8,6 +8,7 @@ #include "../soccr/soccr.h" +#include "common/config.h" #include "cr_options.h" #include "util.h" #include "common/list.h" @@ -19,7 +20,6 @@ #include "image.h" #include "namespaces.h" #include "xmalloc.h" -#include "config.h" #include "kerndat.h" #include "restorer.h" #include "rst-malloc.h" diff --git a/soccr/soccr.h b/soccr/soccr.h index c9d138bfc..2c34e169b 100644 --- a/soccr/soccr.h +++ b/soccr/soccr.h @@ -5,7 +5,7 @@ #include /* uint32_t */ #include /* sockaddr */ -#include "config.h" +#include "common/config.h" /* All packets with this mark have not to be blocked. */ #define SOCCR_MARK 0xC114