[PATCH 0/3] kbuild: remove many tool coverage variables

From: Masahiro Yamada
Date: Mon May 06 2024 - 09:40:20 EST



This patch set removes many instances of the following variables:

- OBJECT_FILES_NON_STANDARD
- KASAN_SANITIZE
- UBSAN_SANITIZE
- KCSAN_SANITIZE
- KMSAN_SANITIZE
- GCOV_PROFILE
- KCOV_INSTRUMENT

Such tools are intended only for kernel space objects, most of which
are listed in obj-y, lib-y, or obj-m.

The best guess is, objects in $(obj-y), $(lib-y), $(obj-m) can opt in
such tools. Otherwise, not.

This works in most places.



Masahiro Yamada (3):
kbuild: provide reasonable defaults for tool coverage
Makefile: remove redundant tool coverage variables
kbuild: use GCOV_PROFILE and KCSAN_SANITIZE in
scripts/Makefile.modfinal

arch/arm/boot/bootp/Makefile | 1 -
arch/arm/boot/compressed/Makefile | 7 -------
arch/arm/vdso/Makefile | 9 ---------
arch/arm64/kernel/pi/Makefile | 6 ------
arch/arm64/kernel/vdso/Makefile | 8 --------
arch/arm64/kvm/hyp/nvhe/Makefile | 13 -------------
arch/csky/kernel/vdso/Makefile | 4 ----
arch/loongarch/vdso/Makefile | 7 -------
arch/mips/boot/compressed/Makefile | 6 ------
arch/mips/vdso/Makefile | 7 -------
arch/parisc/boot/compressed/Makefile | 4 ----
arch/powerpc/kernel/vdso/Makefile | 8 --------
arch/powerpc/purgatory/Makefile | 3 ---
arch/riscv/boot/Makefile | 2 --
arch/riscv/kernel/compat_vdso/Makefile | 6 ------
arch/riscv/kernel/pi/Makefile | 6 ------
arch/riscv/kernel/vdso/Makefile | 6 ------
arch/riscv/purgatory/Makefile | 8 --------
arch/s390/boot/Makefile | 2 ++
arch/s390/kernel/vdso32/Makefile | 8 --------
arch/s390/kernel/vdso64/Makefile | 8 --------
arch/s390/purgatory/Makefile | 8 --------
arch/sh/boot/compressed/Makefile | 3 ---
arch/sparc/vdso/Makefile | 2 --
arch/x86/boot/Makefile | 15 ---------------
arch/x86/boot/compressed/Makefile | 11 -----------
arch/x86/entry/vdso/Makefile | 26 --------------------------
arch/x86/purgatory/Makefile | 9 ---------
arch/x86/realmode/rm/Makefile | 11 -----------
arch/x86/um/vdso/Makefile | 7 -------
arch/xtensa/boot/lib/Makefile | 5 -----
drivers/firmware/efi/libstub/Makefile | 11 -----------
drivers/misc/lkdtm/Makefile | 4 ----
init/Makefile | 3 ---
scripts/Makefile.build | 2 +-
scripts/Makefile.lib | 20 ++++++++++++--------
scripts/Makefile.modfinal | 4 +++-
scripts/Makefile.vmlinux | 3 ---
scripts/mod/Makefile | 1 -
39 files changed, 18 insertions(+), 256 deletions(-)

--
2.40.1