qed: add support for multi-rate transceivers
[linux-2.6-microblaze.git] / scripts / Makefile.kcsan
1 # SPDX-License-Identifier: GPL-2.0
2 ifdef CONFIG_KCSAN
3
4 # GCC and Clang accept backend options differently. Do not wrap in cc-option,
5 # because Clang accepts "--param" even if it is unused.
6 ifdef CONFIG_CC_IS_CLANG
7 cc-param = -mllvm -$(1)
8 else
9 cc-param = --param -$(1)
10 endif
11
12 # Keep most options here optional, to allow enabling more compilers if absence
13 # of some options does not break KCSAN nor causes false positive reports.
14 CFLAGS_KCSAN := -fsanitize=thread \
15         $(call cc-option,$(call cc-param,tsan-instrument-func-entry-exit=0) -fno-optimize-sibling-calls) \
16         $(call cc-option,$(call cc-param,tsan-instrument-read-before-write=1)) \
17         $(call cc-param,tsan-distinguish-volatile=1)
18
19 endif # CONFIG_KCSAN