summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-08-28 13:38:32 +0200
committerDavid Sterba <dsterba@suse.com>2017-09-08 16:15:05 +0200
commita31458b966968e2f8e0ca25340bdd9ccc9df7b02 (patch)
tree200a0b71b9980135e4a4c5da096c187ed7cb3544 /Makefile
parent2e5617c9a6d76b5acd2f04c8567c47803599e843 (diff)
btrfs-progs: build: fix asan and ubsan build
Probably with a new gcc (7.1.1) I started to see asan/ubsan link failures. Fixed by explicitly linking the libraries. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3bc9bb4..62c535c 100644
--- a/Makefile
+++ b/Makefile
@@ -164,6 +164,7 @@ endif
ifneq (,$(findstring asan,$(D)))
DEBUG_CFLAGS_INTERNAL += -fsanitize=address
+ DEBUG_LDFLAGS_INTERNAL += -fsanitize=address -lasan
endif
ifneq (,$(findstring tsan,$(D)))
@@ -173,6 +174,7 @@ endif
ifneq (,$(findstring ubsan,$(D)))
DEBUG_CFLAGS_INTERNAL += -fsanitize=undefined
+ DEBUG_LDFLAGS_INTERNAL += -fsanitize=undefined -lubsan
endif
ifneq (,$(findstring bcheck,$(D)))