summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-06-30 10:52:20 -0600
committerTom Rini <trini@konsulko.com>2016-07-14 18:22:31 -0400
commit022885cb9ce9b22fb62225a21b4eb017a2e8dab5 (patch)
tree1b53ea00945649b60d97c6808eccb36ba212839c /Makefile
parent51f03e6a7596d61a9ae9b1aee030112cc6a795ff (diff)
downloadu-boot-022885cb9ce9b22fb62225a21b4eb017a2e8dab5.tar.gz
u-boot-022885cb9ce9b22fb62225a21b4eb017a2e8dab5.tar.bz2
u-boot-022885cb9ce9b22fb62225a21b4eb017a2e8dab5.zip
tools: Allow building with debug enabled
Sometimes it is useful to build tools with debugging information included so that line-number information is available when run under gdb. Add a Kconfig option to support this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 88128ec72a..7eaa392839 100644
--- a/Makefile
+++ b/Makefile
@@ -256,7 +256,8 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
HOSTCC = cc
HOSTCXX = c++
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
+ $(if $(CONFIG_TOOLS_DEBUG),-g)
HOSTCXXFLAGS = -O2
ifeq ($(HOSTOS),cygwin)