Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-30compel: Make sure the hostprog is built earlyCyrill Gorcunov
The host compel-host-bin must be built before criu, same time the criu itself should not depend on libcompel or plugins because they are the part of the compel package. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-11-23build: Don't forget to rebuild pie code on compel plugins changeCyrill Gorcunov
https://github.com/checkpoint-restore/criu/issues/399 Rerorted-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09s390: Move -msoft-float/-fno-optimize-sibling-calls into compel MakefilesMichael Holzheu
We currently define "CFLAGS += -msoft-float -fno-optimize-sibling-calls" in Makefile.compel. Makefile.compel is included into the toplevel Makefile and so changes CFLAGS which are exported to all criu and zdtm Makefiles. We must not use -msoft-float outside the compel files. E.g. otherwise for zdtm we get the following build error: uptime_grow.o: In function `main': /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__floatdidf' /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__muldf3' /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__floatdidf' /tmp/2/criu/test/zdtm/static/uptime_grow.c:36: undefined reference to `__adddf3 Fix this and move the CFLAGS definition to the compel Makefiles. We do this by defining a new flag CFLAGS_PIE that is only used for pie code. Reported-by: Adrian Reber <areber@redhat.com> Suggested-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Tested-by: Adrian Reber <areber@redhat.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09s390: Prevent GOT relocationsMichael Holzheu
Use the "-fno-optimize-sibling-calls" gcc option to prevent GOT relocations caused by gcc versions without the commit "S/390: Fix 64 bit sibcall": * https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=233169 Otherwise we get compile errors like: GEN criu/pie/parasite-blob.h Error (compel/src/lib/handle-elf-host.c:572): Unsupported relocation of type 26 Those can be caused by the following relocation types: * R_390_GOTENT (e.g. RHEL7 based systems) * R_390_GOTPCDBL (e.g. Debian Jessie) * R_390_GOT12 (e.g. Debian Jessie) Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-08-09s390:compel: Enable s390 in compel/Michael Holzheu
Add s390 parts to common code files. Patch history ------------- v2->v3: * Add: s390: Consolidate -msoft-float into Makefile.compel Reviewed-by: Alice Frosi <alice@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02compel: make plugins .a archivesKir Kolyshkin
The objective is to only do parasite code linking once -- when we link parasite objects with compel plugin(s). So, let's use ar (rather than ld) here. This way we'll have a single ld invocation with the proper flags (from compel ldflags) etc. There are two tricks in doing it: 1. The order of objects while linking is important. Therefore, compel plugins should be the last to add to ld command line. 2. Somehow ld doesn't want to include parasite-head.o in the output (probably because no one else references it), so we have to force it in with the modification to our linker scripts. NB: compel makefiles are still a big mess, but I'll get there. Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-02criu/pie/Makefile: simplify and fixKir Kolyshkin
The way criu/pie/Makefile is currently written, ld is run twice: 1. link $(NAME-obj-y) objects to NAME.built-in.o 2. link NAME.built-in.o, pie.lib.a, and compel plugins to NAME.built-in.bin.o (with compel ldflags and linker script) There is absolutely no need for such two-stage linking, but it was OK. It is not OK now, as "compel ldflags" for ARM doesn't need -r, and we can't run the first stage with -r and the second stage without it. So, let's simplify linking using a single ld invocation. This is my third attempt in doing it, I think I nailed it this time -- it is now clean and (relatively) simple. While at it: - fix compel linker script dependency (it was not working); - rearrange the Makefile so variables goes first, then rules; - remove a comment about mount implementation in restorer. NOTE that compel is called with ./ prefix so the file paths it prints are also prefixed with ./, which is needed for objectify macro to ignore those. Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Add fds plugin (v2)Pavel Emelyanov
This is just export by reasonable name of the existing code, that sends and receives FDs via compel RPC socket. v2: Rebase on recent criu-dev Fix parallel build Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15Makefiles: protect from % rules, don't rebuildKir Kolyshkin
GNU make tries to rebuild any makefiles it uses. While in general it's a good idea (and it is used e.g. in autoconf-based builds), in our case it is not necessary, as all the makefiles are static. More to say, as we have a few "match anything" rules for subdirectories, Makefiles in these subdirs are also matching these rules, which leads to excessive (re)building while a particular makefile is needed. Protect such Makefiles with explicit (or pattern) rules, so make knows it should do nothing to rebuild those. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15Makefiles: nuke $(SRC_DIR)Kir Kolyshkin
As all builds are done from top source dir, there is no need to have SRC_DIR. Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15Makefile: untangle criu depsKir Kolyshkin
Build of criu binary depends on many other things that needs to be built before it. Let's clean these deps a bit by using criu-deps variable. This also removes wrong "$(VERSION_HEADER): include/common/asm" dependency -- one can certainly succeed in generating criu/include/version.h file without creating include/common/asm symlink fist! travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15Makefile.compel: simplify compel-depsKir Kolyshkin
Working on CRIU Makefilest feels like walking on a minefield. This is not an attempt to demine it, but to make some mines a bit easier to notice. OK, this is what we're trying to do here: 1. Drop the $(SRC_DIR)/ prefix from the target: as this is a top-level Makefile, we can just use paths relative to top-level source dir. 2. Drop the $(SRC_DIR) from the symlink, use relative one. Relative symlinks are always better -- say, if a source directory is moved, everything will still work. 3. The "compel/include/asm: compel/arch/$(ARCH)/src/lib/include" dependency is useless. Yes, the left side is created as a symlink to the right side, but that doesn't mean that "make" should compare the timestamps of both to decide whether to remake the target. 4. The "$(COMPEL_VERSION_HEADER): compel/include/asm" dependency is wrong, the compel/include/asm symlink is not needed for $(COMPEL_VERSION_HEADER) generation. Remove it. 5. Move compel/plugins/std.built-in.o prerequisite from the rule to compel-plugins variable, and use it. travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: make include/uapi/asm symlink permanentKir Kolyshkin
Similar to the previous commit, there is absolutely no need to create/remove this symlink from Makefiles, as it can be made a constant one. Add the symlink to sources and save a few lines in Makefiles. travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: make include/uapi symlink permanentKir Kolyshkin
There is absolutely no need to create/remove this symlink from Makefiles, as it is constant. Just add the symlink to sources and save a few lines in Makefiles. travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15Makefile.compel: rm fds pluginKir Kolyshkin
As of commit 3c16dc5 ("compel: plugins -- Merge fds plugin into std") fds plugin is no more. Remove this leftover. travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15Makefiles: introduce/use COMPEL_BINKir Kolyshkin
We call compel-host binary from a number of places, so let's add COMPEL_BIN variable and use it. travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Add installationCyrill Gorcunov
To ship plugins, libs and dev headers. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Build syscalls before the compelCyrill Gorcunov
We will use syscall types in compel infect engine itself so make sure they are built earlier. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Move cpu interface to compelCyrill Gorcunov
We will need it when parasite engine will be creating signal frames. Export appropriate headers and use it in CRIU by linking with libcompel.a. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Rename shipped library to libcompel.aCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Include compel headers as system onesCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15compel: Create symlink into arch dir inside uapi headersCyrill Gorcunov
To be able to include compel/asm/ headers when needed. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14compel: Define separate targtes for pluginsCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14compel: Makefile.compel -- Remove second GEN msgDmitry Safonov
Fixes: GEN compel/include/version.h GEN compel/include/version.h Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-14compel: Reshuffle the directories structureCyrill Gorcunov
Here we rather suffle source code into directories preparing ground for future work. Basically all this files movements should end up in the following compel/ tree structure compel/ ├── arch │ ├── aarch64 │ │ ├── plugins │ │ │ └── std │ │ └── src │ │ └── lib │ ├── arm ... │ ├── ppc64 ... │ └── x86 ... This is architectural part, where each arch consists of plugins/, and src/. src/ stands for code needed by compel cli + lib ├── include │ ├── compiler.h -> ../../criu/include/compiler.h │ ├── elf32-types.h │ ├── elf64-types.h │ ├── int.h -> ../../criu/include/asm-generic/int.h │ ├── piegen.h │ ├── shmem.h │ └── uapi │ ├── compel.h │ └── plugins.h Common includes + uapi ├── plugins │ ├── fds │ ├── shmem │ └── std Plugins source code └── src ├── lib │ ├── handle-elf-32.c -> handle-elf.c │ ├── handle-elf-32-host.c -> handle-elf-32.c │ ├── handle-elf.c │ └── handle-elf-host.c -> handle-elf.c compel library ├── main.c ├── main-host.c -> main.c compel cli └── shared └── fds.c shared code between plugins and compel cli Note: cross-compile won't work for a while. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>