summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.ubsan
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2020-01-29 12:22:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-10 09:42:43 +0100
commit0be4ed979f138294447d4ac39650ff469556af4e (patch)
treea5fa854d7f123e63f02905b34272e1c7c9e6eb02 /lib/Kconfig.ubsan
parent0b86c0d4fdc3fdeaf69cfd7e9b0984e09245785b (diff)
downloadbarebox-0be4ed979f138294447d4ac39650ff469556af4e.tar.gz
barebox-0be4ed979f138294447d4ac39650ff469556af4e.tar.xz
ubsan: use a big if block in Kconfig
A side effect (which was the motivation for this change) is that the config item CONFIG_UBSAN_ALIGNMENT doesn't appear in configurations that have CONFIG_UBSAN disabled. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/Kconfig.ubsan')
-rw-r--r--lib/Kconfig.ubsan6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index 09f4a0ab8a..22958f4801 100644
--- a/lib/Kconfig.ubsan
+++ b/lib/Kconfig.ubsan
@@ -9,9 +9,10 @@ config UBSAN
Compile-time instrumentation is used to detect various undefined
behaviours in runtime.
+if UBSAN
+
config UBSAN_SANITIZE_ALL
bool "Enable instrumentation for all of barebox"
- depends on UBSAN
depends on ARCH_HAS_UBSAN_SANITIZE_ALL
default y
help
@@ -23,7 +24,6 @@ config UBSAN_SANITIZE_ALL
config UBSAN_NO_ALIGNMENT
bool "Disable checking of pointers alignment"
- depends on UBSAN
default y if HAVE_EFFICIENT_UNALIGNED_ACCESS
help
This option disables the check of unaligned memory accesses.
@@ -33,3 +33,5 @@ config UBSAN_NO_ALIGNMENT
config UBSAN_ALIGNMENT
def_bool !UBSAN_NO_ALIGNMENT
+
+endif