summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-19 13:56:08 -0600
committerSimon Glass <sjg@chromium.org>2020-07-28 19:30:39 -0600
commitb47ef6b0d64e98ca54789ae3aeaec7b24b07f6d7 (patch)
treed48ec6ad0e87ea48e0df600f0ccda5100084fb2f /Makefile
parente999bea485b3bec03b8135d78e670fea20201931 (diff)
Makefile: Move CONFIG_TOOLS_DEBUG check to later
At present this is checked before the config has been loaded by the Makefile, so it doesn't work. Move the check to later. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e9882c60fc..888dd1b366 100644
--- a/Makefile
+++ b/Makefile
@@ -278,7 +278,7 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
HOSTCC = cc
HOSTCXX = c++
KBUILD_HOSTCFLAGS := -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
- $(if $(CONFIG_TOOLS_DEBUG),-g) $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
+ $(HOST_LFS_CFLAGS) $(HOSTCFLAGS)
KBUILD_HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS) $(HOSTCXXFLAGS)
KBUILD_HOSTLDFLAGS := $(HOST_LFS_LDFLAGS) $(HOSTLDFLAGS)
KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS)
@@ -735,6 +735,8 @@ KBUILD_CPPFLAGS += $(KCPPFLAGS)
KBUILD_AFLAGS += $(KAFLAGS)
KBUILD_CFLAGS += $(KCFLAGS)
+KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g)
+
# Use UBOOTINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
UBOOTINCLUDE := \