From: David Sterba Date: Sat, 3 Sep 2016 19:36:53 +0000 (+0200) Subject: btrfs-progs: build: add UBSAN to debugging features X-Git-Tag: upstream/4.16.1~1313 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cc6e92972329c939fc5a6945c7acf453b90281c;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: build: add UBSAN to debugging features usage: make D=ubsan Signed-off-by: David Sterba --- diff --git a/Makefile.in b/Makefile.in index fd68b3e..214b042 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,6 +18,7 @@ # abort - call abort() on first error (dumps core) # all - shortcut for all of the above # asan - enable address sanitizer compiler feature +# ubsan - undefined behaviour sanitizer compiler feature # W=123 build with warnings (default: off) # DEBUG_CFLAGS additional compiler flags for debugging build # EXTRA_CFLAGS additional compiler flags @@ -150,6 +151,10 @@ ifneq (,$(findstring asan,$(D))) DEBUG_CFLAGS_INTERNAL += -fsanitize=address endif +ifneq (,$(findstring ubsan,$(D))) + DEBUG_CFLAGS_INTERNAL += -fsanitize=undefined +endif + MAKEOPTS = --no-print-directory Q=$(Q) # build all by default