summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2014-10-07 11:09:04 -0300
committerDavid Sterba <dsterba@suse.cz>2014-10-10 10:38:38 +0200
commit05499d865f061c258ef2a15b1ad5b650c991371a (patch)
tree0497561ebc867ee9d022b30a5748ddc72094a3e2 /Makefile
parentcb37bf83cc583dfe1e22344049a649b363228509 (diff)
btrfs-progs: add option to disable backtrace usage
This commit adds the support for a make variable named "DISABLE_BACKTRACE" which allows to disable the support for backtrace() usage on ASSERT(), BUG() and BUG_ON() calls. This is useful because some alternative C libraries like uClibc have optional support for backtrace() which is rarely built when debugging isn't taking place. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7cc77839..342545ce 100644
--- a/Makefile
+++ b/Makefile
@@ -63,6 +63,10 @@ BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS))
CLEANDIRS = $(patsubst %,clean-%,$(SUBDIRS))
+ifeq ($(DISABLE_BACKTRACE),1)
+AM_CFLAGS += -DBTRFS_DISABLE_BACKTRACE
+endif
+
ifneq ($(DISABLE_DOCUMENTATION),1)
BUILDDIRS += build-Documentation
INSTALLDIRS += install-Documentation