From patchwork Sun Jun 14 02:57:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 242309 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sat, 13 Jun 2020 20:57:18 -0600 Subject: [PATCH v2 39/49] Makefile: Move CONFIG_TOOLS_DEBUG check to later In-Reply-To: <20200614025728.41065-1-sjg@chromium.org> References: <20200614025728.41065-1-sjg@chromium.org> Message-ID: <20200613205717.v2.39.I60eb805c52c660ea1fb9888a939268cf9da79a86@changeid> 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 Reviewed-by: Bin Meng --- (no changes since v1) Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7009eb7be7..c3fe2cb8a5 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) @@ -732,6 +732,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 := \