diff options
Diffstat (limited to 'Makefile.flags')
-rw-r--r-- | Makefile.flags | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile.flags b/Makefile.flags index 9f77674ba..65021de25 100644 --- a/Makefile.flags +++ b/Makefile.flags | |||
@@ -75,6 +75,11 @@ else | |||
75 | CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) | 75 | CFLAGS += $(call cc-option,-Os,$(call cc-option,-O2,)) |
76 | endif | 76 | endif |
77 | endif | 77 | endif |
78 | ifeq ($(CONFIG_DEBUG_SANITIZE),y) | ||
79 | CFLAGS += $(call cc-option,-fsanitize=address,) | ||
80 | CFLAGS += $(call cc-option,-fsanitize=leak,) | ||
81 | CFLAGS += $(call cc-option,-fsanitize=undefined,) | ||
82 | endif | ||
78 | 83 | ||
79 | # If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... | 84 | # If arch/$(ARCH)/Makefile did not override it (with, say, -fPIC)... |
80 | ARCH_FPIC ?= -fpic | 85 | ARCH_FPIC ?= -fpic |