Clang changed the way it enables UBSan trapping mode. Update the Makefile logic to discover it.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -10,6 +10,6 @@ ubsan-cflags-$(CONFIG_UBSAN_DIV_ZERO) += -fsanitize=integer-divide-by-zero · 9 unmodified lines | ||
| 10 | 10 | ubsan-cflags-$(CONFIG_UBSAN_UNREACHABLE) += -fsanitize=unreachable |
| 11 | 11 | ubsan-cflags-$(CONFIG_UBSAN_BOOL) += -fsanitize=bool |
| 12 | 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 | 15 | export CFLAGS_UBSAN := $(ubsan-cflags-y) |