summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-05-04 15:25:30 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-05-04 15:25:30 +0200
commita8644aebec1152b992d5d54a05a538d338262944 (patch)
tree5c0084fbcaf77545497d0ca92bc033693b185653 /scripts/Makefile.lib
parent9e96e646e6f890308110cb7c81f200f5211cf082 (diff)
parent3b02a051d25d9600e9d403ad3043aed7de00160e (diff)
Merge branch 'locking/kcsan' into x86/entryentry-base
Pull the pending KCSAN changes as the required changes vs. atomics to fixup INT3 interfere with the KCSAN modifications of atomics.
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 4b799737722c..37d7d27b85da 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -149,6 +149,16 @@ _c_flags += $(if $(patsubst n%,, \
$(CFLAGS_KCOV))
endif
+#
+# Enable KCSAN flags except some files or directories we don't want to check
+# (depends on variables KCSAN_SANITIZE_obj.o, KCSAN_SANITIZE)
+#
+ifeq ($(CONFIG_KCSAN),y)
+_c_flags += $(if $(patsubst n%,, \
+ $(KCSAN_SANITIZE_$(basetarget).o)$(KCSAN_SANITIZE)y), \
+ $(CFLAGS_KCSAN))
+endif
+
# $(srctree)/$(src) for including checkin headers from generated source files
# $(objtree)/$(obj) for including generated headers from checkin source files
ifeq ($(KBUILD_EXTMOD),)