From a31458b966968e2f8e0ca25340bdd9ccc9df7b02 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 28 Aug 2017 13:38:32 +0200 Subject: [PATCH] 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 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) 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))) -- 2.7.4