aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.kcov
diff options
context:
space:
mode:
authorVictor Chibotaru <[email protected]>2017-11-17 15:30:50 -0800
committerLinus Torvalds <[email protected]>2017-11-17 16:10:04 -0800
commitd677a4d6019385488e794cc47bd3d6f9c2aab874 (patch)
tree5c94f48e2a9acfb553a359c30bcbb2c0f76ba266 /scripts/Makefile.kcov
parentkcov: support comparison operands collection (diff)
downloadwireguard-linux-d677a4d6019385488e794cc47bd3d6f9c2aab874.tar.xz
wireguard-linux-d677a4d6019385488e794cc47bd3d6f9c2aab874.zip
Makefile: support flag -fsanitizer-coverage=trace-cmp
The flag enables Clang instrumentation of comparison operations (currently not supported by GCC). This instrumentation is needed by the new KCOV device to collect comparison operands. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Victor Chibotaru <[email protected]> Signed-off-by: Alexander Potapenko <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Alexander Popov <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Kees Cook <[email protected]> Cc: Vegard Nossum <[email protected]> Cc: Quentin Casasnovas <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to '')
-rw-r--r--scripts/Makefile.kcov7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov
new file mode 100644
index 000000000000..5cc72037e423
--- /dev/null
+++ b/scripts/Makefile.kcov
@@ -0,0 +1,7 @@
+ifdef CONFIG_KCOV
+CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
+ifeq ($(CONFIG_KCOV_ENABLE_COMPARISONS),y)
+CFLAGS_KCOV += $(call cc-option,-fsanitize-coverage=trace-cmp,)
+endif
+
+endif
OSZAR »