diff --git a/compel/test/fdspy/Makefile b/compel/test/fdspy/Makefile index 82d9fdc0b24..ab128373d5d 100644 --- a/compel/test/fdspy/Makefile +++ b/compel/test/fdspy/Makefile @@ -1,4 +1,4 @@ -CC := gcc +CC ?= gcc CFLAGS ?= -O2 -g -Wall -Werror COMPEL := ../../../compel/compel-host diff --git a/compel/test/infect/Makefile b/compel/test/infect/Makefile index bacfad96245..60d46eeccd8 100644 --- a/compel/test/infect/Makefile +++ b/compel/test/infect/Makefile @@ -1,4 +1,4 @@ -CC := gcc +CC ?= gcc CFLAGS ?= -O2 -g -Wall -Werror COMPEL := ../../../compel/compel-host diff --git a/compel/test/rsys/Makefile b/compel/test/rsys/Makefile index 53400498e4e..d8710e9ad5b 100644 --- a/compel/test/rsys/Makefile +++ b/compel/test/rsys/Makefile @@ -1,4 +1,4 @@ -CC := gcc +CC ?= gcc CFLAGS ?= -O2 -g -Wall -Werror COMPEL := ../../../compel/compel-host diff --git a/criu/arch/aarch64/include/asm/restorer.h b/criu/arch/aarch64/include/asm/restorer.h index 64a9c24eb9a..f12f89d0199 100644 --- a/criu/arch/aarch64/include/asm/restorer.h +++ b/criu/arch/aarch64/include/asm/restorer.h @@ -13,7 +13,7 @@ #define RUN_CLONE_RESTORE_FN(ret, clone_flags, new_sp, parent_tid, \ thread_args, clone_restore_fn) \ asm volatile( \ - "clone_emul: \n" \ + "clone_emul_%=: \n" \ "ldr x1, %2 \n" \ "and x1, x1, #~15 \n" \ "sub x1, x1, #16 \n" \ @@ -24,16 +24,16 @@ "mov x8, #"__stringify(__NR_clone)" \n" \ "svc #0 \n" \ \ - "cbz x0, thread_run \n" \ + "cbz x0, thread_run_%= \n" \ \ "mov %0, x0 \n" \ - "b clone_end \n" \ + "b clone_end_%= \n" \ \ - "thread_run: \n" \ + "thread_run_%=: \n" \ "ldp x1, x0, [sp] \n" \ "br x1 \n" \ \ - "clone_end: \n" \ + "clone_end_%=: \n" \ : "=r"(ret) \ : "r"(clone_flags), \ "m"(new_sp), \ diff --git a/scripts/ci/docker.env b/scripts/ci/docker.env index 399ced69417..807f8b0546b 100644 --- a/scripts/ci/docker.env +++ b/scripts/ci/docker.env @@ -1,4 +1,4 @@ SKIP_CI_PREP=1 ZDTM_OPTS=-x zdtm/static/binfmt_misc -x zdtm/static/sched_policy00 -CC=gcc +CC=clang SKIP_EXT_DEV_TEST=1 diff --git a/scripts/ci/run-ci-tests.sh b/scripts/ci/run-ci-tests.sh index 47749e7fa82..8bcbb27b12a 100755 --- a/scripts/ci/run-ci-tests.sh +++ b/scripts/ci/run-ci-tests.sh @@ -39,7 +39,7 @@ ci_prep () { # This can fail on aarch64 travis service apport stop || : - if [ "$CLANG" = "1" ]; then + if [ "$CC" = "clang" ]; then # clang support CC=clang # If this is running in an environment without gcc installed diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk index 724204a03c6..d6834401466 100644 --- a/scripts/nmk/scripts/tools.mk +++ b/scripts/nmk/scripts/tools.mk @@ -7,7 +7,7 @@ HOSTLD ?= ld ifeq ($(origin LD), default) LD := $(CROSS_COMPILE)$(HOSTLD) endif -HOSTCC ?= gcc +HOSTCC ?= clang ifeq ($(origin CC), default) CC := $(CROSS_COMPILE)$(HOSTCC) endif diff --git a/test/others/Makefile b/test/others/Makefile index b84894bfa36..e18fd1e8747 100644 --- a/test/others/Makefile +++ b/test/others/Makefile @@ -1,2 +1,2 @@ loop: - gcc -Wall loop.c -o loop + $(CC) -Wall loop.c -o loop diff --git a/test/others/app-emu/job/Makefile b/test/others/app-emu/job/Makefile index 2fde2f6edc3..ef6702858c9 100644 --- a/test/others/app-emu/job/Makefile +++ b/test/others/app-emu/job/Makefile @@ -2,10 +2,10 @@ all: job .PHONY: all %.o: %.c - gcc -c $< -o $@ + $(CC) -c $< -o $@ job: job.o - gcc -o $@ job.o + $(CC) -o $@ job.o clean: rm -f *.o job diff --git a/test/others/app-emu/make/Makefile b/test/others/app-emu/make/Makefile index 5ae82226e6d..6c4983ec29e 100644 --- a/test/others/app-emu/make/Makefile +++ b/test/others/app-emu/make/Makefile @@ -3,7 +3,7 @@ all: foo1.o foo2.o foo3.o foo4.o .PHONY: all %.o: %.c - gcc -c $< -o $@ + $(CC) -c $< -o $@ foo%.c: tmpl.c cp $< $@ diff --git a/test/others/ext-links/Makefile b/test/others/ext-links/Makefile index 236a97d25aa..23639a3bc48 100644 --- a/test/others/ext-links/Makefile +++ b/test/others/ext-links/Makefile @@ -1,4 +1,4 @@ all: mvlink.so mvlink.so: mvlink.c - gcc -g -Werror -Wall -shared -nostartfiles mvlink.c -o mvlink.so -iquote ../../../criu/include -fPIC + $(CC) -g -Werror -Wall -shared -nostartfiles mvlink.c -o mvlink.so -iquote ../../../criu/include -fPIC diff --git a/test/others/libcriu/Makefile b/test/others/libcriu/Makefile index ae733053314..276e726fdf3 100644 --- a/test/others/libcriu/Makefile +++ b/test/others/libcriu/Makefile @@ -18,13 +18,13 @@ run: all define genb $(1): $(1).o lib.o - gcc $$^ -L ../../../../criu/lib/c/ -L ../../../../criu/images/ -lcriu -o $$@ + $(CC) $$^ -L ../../../../criu/lib/c/ -L ../../../../criu/images/ -lcriu -o $$@ endef $(foreach t, $(TESTS), $(eval $(call genb, $(t)))) %.o: %.c - gcc -c $^ -iquote ../../../../criu/criu/include -I../../../../criu/lib/c/ -I../../../../criu/images/ -o $@ -Werror + $(CC) -c $^ -iquote ../../../../criu/criu/include -I../../../../criu/lib/c/ -I../../../../criu/images/ -o $@ -Werror clean: libcriu_clean rm -rf $(TESTS) $(TESTS:%=%.o) lib.o diff --git a/test/others/mounts/ext/Makefile b/test/others/mounts/ext/Makefile index 282fba0efe2..c3a8d2fe79a 100644 --- a/test/others/mounts/ext/Makefile +++ b/test/others/mounts/ext/Makefile @@ -1,13 +1,13 @@ all: ext-mount.so ns_init ext-mount.so: ext-mount.c - gcc -g -Werror -Wall -shared -nostartfiles ext-mount.c -o ext-mount.so -iquote ../../../include -fPIC + $(CC) -g -Werror -Wall -shared -nostartfiles ext-mount.c -o ext-mount.so -iquote ../../../include -fPIC ns_init: ns_init.o - gcc -static $< -o $@ + $(CC) -static $< -o $@ ns_init.o: ns_init.c - gcc -c $< -o $@ + $(CC) -c $< -o $@ run: all ./run.sh diff --git a/test/others/unix-callback/Makefile b/test/others/unix-callback/Makefile index 25bcf228b38..13836e1c33e 100644 --- a/test/others/unix-callback/Makefile +++ b/test/others/unix-callback/Makefile @@ -7,16 +7,16 @@ unix.pb-c.c: unix.proto protoc-c --proto_path=. --c_out=. unix.proto unix-lib.so: unix-lib.c unix.pb-c.c - gcc -g -Werror -Wall -shared -nostartfiles unix-lib.c unix.pb-c.c -o unix-lib.so -iquote ../../../criu/include -fPIC + $(CC) -g -Werror -Wall -shared -nostartfiles unix-lib.c unix.pb-c.c -o unix-lib.so -iquote ../../../criu/include -fPIC syslog-lib.so: syslog-lib.c - gcc -g -Werror -Wall -shared -nostartfiles syslog-lib.c -o syslog-lib.so -iquote ../../../criu/include -fPIC + $(CC) -g -Werror -Wall -shared -nostartfiles syslog-lib.c -o syslog-lib.so -iquote ../../../criu/include -fPIC unix-server: unix-server.c - gcc -Werror -Wall -o unix-server unix-server.c + $(CC) -Werror -Wall -o unix-server unix-server.c unix-client: unix-client.c - gcc -Werror -Wall -o unix-client unix-client.c + $(CC) -Werror -Wall -o unix-client unix-client.c clean: rm -rf data unix-lib.so unix-server unix-client syslog-lib.so output pid unix.pb-c.* diff --git a/test/zdtm/Makefile.inc b/test/zdtm/Makefile.inc index d3452331541..169207b7053 100644 --- a/test/zdtm/Makefile.inc +++ b/test/zdtm/Makefile.inc @@ -33,7 +33,7 @@ ifeq ($(ARCH),arm) endif endif -HOSTCC ?= gcc +HOSTCC ?= clang ifeq ($(origin CC), default) CC := $(CROSS_COMPILE)$(HOSTCC) endif