[PATCH] tools build: Respect HOSTCFLAGS in 'fixdep' compilation
From: Brian Norris
Date: Tue Aug 13 2024 - 23:04:55 EST
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@xxxxxxxxxxxxx>
Closes: https://lore.kernel.org/lkml/99ae0d34-ed76-4ca0-a9fd-c337da33c9f9@xxxxxxxxxxxxx/
Tested-by: Thorsten Leemhuis <linux@xxxxxxxxxxxxx>
Fixes: ea974028a049 ("tools build: Avoid circular .fixdep-in.o.cmd issues")
Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
tools/build/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 $@ $<
--
2.46.0.76