diff mbox series

tools build: Respect HOSTCFLAGS in 'fixdep' compilation

Message ID 20240814030436.2022155-1-briannorris@chromium.org (mailing list archive)
State New
Headers show
Series tools build: Respect HOSTCFLAGS in 'fixdep' compilation | expand

Commit Message

Brian Norris Aug. 14, 2024, 3:03 a.m. UTC
When refactoring the Makefile rules for 'fixdep', I open-coded the
compilation rule (avoiding the "Build" recursive make, and therefore
tools/build/Build.include). In doing so, I omitted HOSTCFLAGS, which was
previously part of the host_c_flags definition.

Add that back in, so builds get a matching set of host CFLAGS and
LDFLAGS for this step.

Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
Closes: https://lore.kernel.org/lkml/99ae0d34-ed76-4ca0-a9fd-c337da33c9f9@leemhuis.info/
Tested-by: Thorsten Leemhuis <linux@leemhuis.info>
Fixes: ea974028a049 ("tools build: Avoid circular .fixdep-in.o.cmd issues")
Signed-off-by: Brian Norris <briannorris@chromium.org>
---

 tools/build/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/build/Makefile b/tools/build/Makefile
index fea3cf647f5b..85321c7b6804 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -44,4 +44,4 @@  ifneq ($(wildcard $(TMP_O)),)
 endif
 
 $(OUTPUT)fixdep: $(srctree)/tools/build/fixdep.c
-	$(QUIET_CC)$(HOSTCC) $(KBUILD_HOSTLDFLAGS) -o $@ $<
+	$(QUIET_CC)$(HOSTCC) $(HOSTCFLAGS) $(KBUILD_HOSTLDFLAGS) -o $@ $<