[PATCH] tools build: Provide consistent build options for fixdep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The fixdep binary is being compiled and linked in one step since commit
ea974028a049 ("tools build: Avoid circular .fixdep-in.o.cmd issues").
While the host linker flags are passed to the compiler the host compiler
flags are missed.

That might lead to failures as result of the compiler vs linker flags
inconsistency. For example, during RPM package build redhat-hardened-ld
script is provided to gcc, while redhat-hardened-cc1 script is missed.
That leads to an error on s390:

/usr/bin/ld: /tmp/ccUT8Rdm.o: `stderr@@GLIBC_2.2' non-PLT reloc for
symbol defined in shared library and accessed from executable (rebuild
file with -fPIC ?)

Provide both KBUILD_HOSTCFLAGS and KBUILD_HOSTLDFLAGS to avoid that.

Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
---

This patch is against kernel-next next-20240814 tag

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

diff --git a/tools/build/Makefile b/tools/build/Makefile
index fea3cf647f5b..18ad131f6ea7 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) $(KBUILD_HOSTCFLAGS) $(KBUILD_HOSTLDFLAGS) -o $@ $<
-- 
2.43.0





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux