srctree := $(patsubst %/tools/testing/selftests/,%,$(dir $(CURDIR)))
endif
-include $(srctree)/tools/scripts/Makefile.include
include $(srctree)/tools/scripts/utilities.mak
# We need this for the "cc-option" macro.
include $(srctree)/tools/build/Build.include
ifneq ($(call is-absolute,$(O)),y)
$(error Only absolute O= parameters are supported)
endif
+objtree := $(O)
+else
+objtree ?= $(srctree)
endif
ifeq ($(ARCH),)
ARCH = $(SUBARCH)
endif
-objtree ?= $(srctree)
-
# XARCH extends the kernel's ARCH with a few variants of the same
# architecture that only differ by the configuration, the toolchain
# and the Qemu program used. It is copied as-is into ARCH except for
$(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_EXTRA)
LDFLAGS :=
+# Modify CFLAGS based on LLVM=
+include $(srctree)/tools/scripts/Makefile.include
+
REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \
END{ printf("\n%3d test(s): %3d passed, %3d skipped, %3d failed => status: ", p+s+f, p, s, f); \
if (f || !p) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \