File: fixdep-allow-overriding-hostcc-and-hostld.patch

package info (click to toggle)
linux 6.16.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,724,628 kB
  • sloc: ansic: 26,562,645; asm: 271,329; sh: 144,039; python: 72,469; makefile: 57,135; perl: 36,821; xml: 19,553; cpp: 5,820; yacc: 4,915; lex: 2,955; awk: 1,667; sed: 28; ruby: 25
file content (26 lines) | stat: -rw-r--r-- 903 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: Ben Hutchings <benh@debian.org>
Date: Sat, 13 May 2023 13:03:26 +0200
Subject: fixdep: Allow overriding HOSTCC and HOSTLD
Forwarded: not-needed

objtool always uses HOSTCC, HOSTLD, and HOSTAR, so we need to override
these on the command line for cross-builds of linux-kbuild.  But it
also builds fixdep which still needs to be native in a cross-build.
Add support for REALHOSTCC and REALHOSTLD variables which, if set,
override HOSTCC and HOSTLD for fixdep only.

---
--- a/tools/build/Makefile.include
+++ b/tools/build/Makefile.include
@@ -12,7 +12,10 @@ else
 endif
 
 fixdep:
-	$(SILENT_MAKE) -C $(srctree)/tools/build $(OUTPUT)fixdep
+	$(SILENT_MAKE) -C $(srctree)/tools/build \
+		$(if $(REALHOSTCC),HOSTCC=$(REALHOSTCC) KBUILD_HOSTCFLAGS=) \
+		$(if $(REALHOSTLD),HOSTLD=$(REALHOSTLD) KBUILD_HOSTLDFLAGS=) \
+		$(OUTPUT)fixdep
 
 fixdep-clean:
 	$(Q)$(MAKE) -C $(srctree)/tools/build clean