mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 17:49:13 +00:00
With this, one can do a CRUI build via QEMU+Docker using clang as a compiler, for example: make -C scripts/build alpine-clang make -C scripts/build ppc64le-clang For alpine, default clang version is used. For others, a version has to be specified explicitly, as there is no package called "clang" in Ubuntu Trusty (which is used as a base for most arches). Since clang-3.8 appears to be available from Trusty, and this is the current stable version of clang, let's use it. travis-ci: success for QEMU+Dockerfile improvements + clang build Signed-off-by: Kir Kolyshkin <kir@openvz.org> Acked-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
35 lines
843 B
Makefile
35 lines
843 B
Makefile
ARCHES ?= armv7hf aarch64 ppc64le # x86_64
|
|
all: $(ARCHES)
|
|
|
|
Dockerfile.%: Dockerfile.%.hdr Dockerfile.tmpl
|
|
cat $^ > $@
|
|
|
|
qemu-user-static:
|
|
./extract-deb-pkg qemu-user-static
|
|
|
|
binfmt_misc:
|
|
./binfmt_misc
|
|
.PHONY: binfmt_misc
|
|
|
|
alpine:
|
|
docker build -t criu-$@ -f Dockerfile.alpine $(DB_ARGS) ../..
|
|
|
|
%: Dockerfile.% qemu-user-static binfmt_misc
|
|
docker build -t criu-$@ -f $< $(DB_ARGS) ../..
|
|
|
|
%-clang: DB_ARGS=--build-arg CC=clang-3.8
|
|
alpine-clang: DB_ARGS=--build-arg CC=clang
|
|
alpine-clang: alpine
|
|
armv7hf-clang: armv7hf
|
|
aarch64-clang: aarch64
|
|
ppc64le-clang: ppc64le
|
|
x86_64-clang: x86_64
|
|
.PHONY: alpine-clang armv7hf-clang aarch64-clang ppc64le-clang x86_64-clang
|
|
|
|
clean:
|
|
rm -rf qemu-user-static
|
|
for ARCH in $(ARCHES); do \
|
|
FILE=/proc/sys/fs/binfmt_misc/$$ARCH; \
|
|
test -f $$FILE && echo -1 > $$FILE; \
|
|
rm -f Dockerfile.$$ARCH; \
|
|
done
|