Makefile: disable unaligned loads with UBSan
[gitweb.git] / Makefile
index d03880e6901d5a56470358ab2e58f39e80170700..852dedc25c57b61e5f3747d1c1efb533329fb543 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -994,6 +994,9 @@ endif
 ifdef SANITIZE
 BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)
 BASIC_CFLAGS += -fno-omit-frame-pointer
+ifeq ($(SANITIZE),undefined)
+BASIC_CFLAGS += -DNO_UNALIGNED_LOADS
+endif
 endif
 
 ifndef sysconfdir