Back to home page

LXR

 
 

    


0001 ifdef CONFIG_UBSAN
0002       CFLAGS_UBSAN += $(call cc-option, -fsanitize=shift)
0003       CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
0004       CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
0005       CFLAGS_UBSAN += $(call cc-option, -fsanitize=vla-bound)
0006       CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
0007       CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds)
0008       CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
0009       CFLAGS_UBSAN += $(call cc-option, -fsanitize=returns-nonnull-attribute)
0010       CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool)
0011       CFLAGS_UBSAN += $(call cc-option, -fsanitize=enum)
0012 
0013 ifdef CONFIG_UBSAN_ALIGNMENT
0014       CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment)
0015 endif
0016 
0017 ifdef CONFIG_UBSAN_NULL
0018       CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
0019 endif
0020 
0021       # -fsanitize=* options makes GCC less smart than usual and
0022       # increase number of 'maybe-uninitialized false-positives
0023       CFLAGS_UBSAN += $(call cc-option, -Wno-maybe-uninitialized)
0024 endif