Clang changed the way it enables UBSan trapping mode. Update the Makefile logic to discover it.
Unified · Split
| @@ -10,6 +10,6 @@ ubsan-cflags-$(CONFIG_UBSAN_DIV_ZERO) += -fsanitize=integer-divide-by-zero · 9 unmodified lines | |||
| 10 | ubsan-cflags-$(CONFIG_UBSAN_UNREACHABLE) += -fsanitize=unreachable | 10 | ubsan-cflags-$(CONFIG_UBSAN_UNREACHABLE) += -fsanitize=unreachable |
| 11 | ubsan-cflags-$(CONFIG_UBSAN_BOOL) += -fsanitize=bool | 11 | ubsan-cflags-$(CONFIG_UBSAN_BOOL) += -fsanitize=bool |
| 12 | ubsan-cflags-$(CONFIG_UBSAN_ENUM) += -fsanitize=enum | 12 | ubsan-cflags-$(CONFIG_UBSAN_ENUM) += -fsanitize=enum |
| 13 | ubsan-cflags-$(CONFIG_UBSAN_TRAP) += -fsanitize-undefined-trap-on-error | 13 | ubsan-cflags-$(CONFIG_UBSAN_TRAP) += $(call cc-option,-fsanitize-trap=undefined,-fsanitize-undefined-trap-on-error) |
| 14 | 14 | ||
| 15 | export CFLAGS_UBSAN := $(ubsan-cflags-y) | 15 | export CFLAGS_UBSAN := $(ubsan-cflags-y) |