aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2021-06-02 10:07:55 +0000
committerAndrew Turner <andrew@FreeBSD.org>2021-06-02 10:59:19 +0000
commit2422138952d86dd8b02ff33c55f747ca8e381afe (patch)
tree8e9cf5393c827bf432a4be3994d47b58ffb46b45
parent0a0d6ce34d6be89cb356c7815648e455fabe3151 (diff)
downloadsrc-2422138952d86dd8b02ff33c55f747ca8e381afe.tar.gz
src-2422138952d86dd8b02ff33c55f747ca8e381afe.zip
Fix the KCSAN_ENABLED check when building modules
The KCSAN_ENABLED variable is non-empty when the kernel is being built with KCSAN. This allows us to disable modules that are known to be broken. There was a bug where we would check if it was defined. As this is always the case the KCSAN_ENABLED variable would be set when building modules so we would never build such a module. Fix this by checking if the value is empty before passing it on to the module stage. This doesn't affect how modules are built as the CFLAGS passed to modules has the correct check. Reported by: rstone Sponsored by: Innovate UK
-rw-r--r--sys/conf/kern.post.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 4e830b8f5115..bb25c7277d85 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -38,7 +38,7 @@ MKMODULESENV+= WITH_CTF="${WITH_CTF}"
MKMODULESENV+= WITH_EXTRA_TCP_STACKS="${WITH_EXTRA_TCP_STACKS}"
.endif
-.if defined(KCSAN_ENABLED)
+.if !empty(KCSAN_ENABLED)
MKMODULESENV+= KCSAN_ENABLED="yes"
.endif