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:
parent
092698b40a
commit
339019c934
9
Makefile
9
Makefile
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue