btrfs-progs: build: add internal LDFLAGS for the D= features

We might want to pass additional linker flags for various sanitization
features.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-08-25 20:04:48 +02:00
parent 092698b40a
commit 339019c934
1 changed files with 8 additions and 1 deletions

View File

@ -55,6 +55,10 @@ DEBUG_CFLAGS_DEFAULT = -O0 -U_FORTIFY_SOURCE -ggdb3
DEBUG_CFLAGS_INTERNAL =
DEBUG_CFLAGS :=
DEBUG_LDFLAGS_DEFAULT =
DEBUG_LDFLAGS_INTERNAL =
DEBUG_LDFLAGS :=
TOPDIR := $(shell pwd)
# Common build flags
@ -72,7 +76,9 @@ CFLAGS = $(SUBST_CFLAGS) \
$(EXTRA_CFLAGS)
LDFLAGS = $(SUBST_LDFLAGS) \
-rdynamic -L$(TOPDIR) $(EXTRA_LDFLAGS)
-rdynamic -L$(TOPDIR) \
$(DEBUG_LDFLAGS_INTERNAL) \
$(EXTRA_LDFLAGS)
LIBS = $(LIBS_BASE)
LIBBTRFS_LIBS = $(LIBS_BASE)
@ -135,6 +141,7 @@ endif
ifeq ("$(origin D)", "command line")
DEBUG_CFLAGS_INTERNAL = $(DEBUG_CFLAGS_DEFAULT) $(DEBUG_CFLAGS)
DEBUG_LDFLAGS_INTERNAL = $(DEBUG_LDFLAGS_DEFAULT) $(DEBUG_LDFLAGS)
endif
ifneq (,$(findstring verbose,$(D)))