0001
0002
0003
0004 ubsan-cflags-$(CONFIG_UBSAN_ALIGNMENT) += -fsanitize=alignment
0005 ubsan-cflags-$(CONFIG_UBSAN_ONLY_BOUNDS) += -fsanitize=bounds
0006 ubsan-cflags-$(CONFIG_UBSAN_ARRAY_BOUNDS) += -fsanitize=array-bounds
0007 ubsan-cflags-$(CONFIG_UBSAN_LOCAL_BOUNDS) += -fsanitize=local-bounds
0008 ubsan-cflags-$(CONFIG_UBSAN_SHIFT) += -fsanitize=shift
0009 ubsan-cflags-$(CONFIG_UBSAN_DIV_ZERO) += -fsanitize=integer-divide-by-zero
0010 ubsan-cflags-$(CONFIG_UBSAN_UNREACHABLE) += -fsanitize=unreachable
0011 ubsan-cflags-$(CONFIG_UBSAN_BOOL) += -fsanitize=bool
0012 ubsan-cflags-$(CONFIG_UBSAN_ENUM) += -fsanitize=enum
0013 ubsan-cflags-$(CONFIG_UBSAN_TRAP) += -fsanitize-undefined-trap-on-error
0014
0015 export CFLAGS_UBSAN := $(ubsan-cflags-y)