summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVictor Chibotaru <tchibo@google.com>2017-11-17 18:30:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-17 19:10:04 -0500
commitd677a4d6019385488e794cc47bd3d6f9c2aab874 (patch)
tree5c94f48e2a9acfb553a359c30bcbb2c0f76ba266 /Makefile
parentded97d2c2b2c5f1dcced0bc57133f7753b037dfc (diff)
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/20171011095459.70721-2-glider@google.com Signed-off-by: Victor Chibotaru <tchibo@google.com> Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Konovalov <andreyknvl@google.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Alexander Popov <alex.popov@linux.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Kees Cook <keescook@chromium.org> Cc: Vegard Nossum <vegard.nossum@oracle.com> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: <syzkaller@googlegroups.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 1 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 763ab35df12a..ccb7d5b2fbf5 100644
--- a/Makefile
+++ b/Makefile
@@ -375,8 +375,6 @@ CFLAGS_KERNEL =
375AFLAGS_KERNEL = 375AFLAGS_KERNEL =
376LDFLAGS_vmlinux = 376LDFLAGS_vmlinux =
377CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,) 377CFLAGS_GCOV := -fprofile-arcs -ftest-coverage -fno-tree-loop-im $(call cc-disable-warning,maybe-uninitialized,)
378CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
379
380 378
381# Use USERINCLUDE when you must reference the UAPI directories only. 379# Use USERINCLUDE when you must reference the UAPI directories only.
382USERINCLUDE := \ 380USERINCLUDE := \
@@ -659,6 +657,7 @@ ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLA
659 KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO 657 KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
660endif 658endif
661 659
660include scripts/Makefile.kcov
662include scripts/Makefile.gcc-plugins 661include scripts/Makefile.gcc-plugins
663 662
664ifdef CONFIG_READABLE_ASM 663ifdef CONFIG_READABLE_ASM