mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
6e8d666e92
Several build configurations had already disabled this warning because it generates a lot of false positives. But some had not, and it was still enabled for "allmodconfig" builds, for example. Looking at the warnings produced, every single one I looked at was a false positive, and the warnings are frequent enough (and big enough) that they can easily hide real problems that you don't notice in the noise generated by -Wmaybe-uninitialized. The warning is good in theory, but this is a classic case of a warning that causes more problems than the warning can solve. If gcc gets better at avoiding false positives, we may be able to re-enable this warning. But as is, we're better off without it, and I want to be able to see the *real* warnings. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 lines
830 B
Text
17 lines
830 B
Text
ifdef CONFIG_UBSAN
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=shift)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=vla-bound)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=returns-nonnull-attribute)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool)
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=enum)
|
|
|
|
ifdef CONFIG_UBSAN_ALIGNMENT
|
|
CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment)
|
|
endif
|
|
endif
|