btrfs-progs: build: fix building libbtrfs.so with tsan

Except libbtrfs.so object, all other tools compile fine. The error is:

ld: send-stream.o: relocation R_X86_64_PC32 against symbol
`stderr@@GLIBC_2.2.5' can not be used when making a shared object;
recompile with -fPIC

Compiling with -fPIC fixes the problem.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-08-28 13:33:19 +02:00
parent b8c9c457c1
commit 2e5617c9a6
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ ifneq (,$(findstring asan,$(D)))
endif
ifneq (,$(findstring tsan,$(D)))
DEBUG_CFLAGS_INTERNAL += -fsanitize=thread -fPIE
DEBUG_CFLAGS_INTERNAL += -fsanitize=thread -fPIC
DEBUG_LDFLAGS_INTERNAL += -fsanitize=thread -ltsan -pie
endif