From e740d4cf7948fe68edc472cfd54f86a457a6879c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 12 Jul 2018 17:54:58 +0100 Subject: [PATCH] linux-kbuild: Fix the assumed host architecture for cross-built objtool The previous fix ensured that objtool was built for the right host architecture, but it was still including some UAPI header files (in particular ) for the build architecture. --- debian/changelog | 2 ++ debian/rules.d/tools/objtool/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6dfd5a5c1..7102aaea3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ linux (4.17.6-2) UNRELEASED; urgency=medium build-dependency * debian/rules.real: Pass KERNEL_ARCH variable down to debian/rules.d * debian/rules.d/tools/perf/Makefile: Use KERNEL_ARCH variable + * linux-kbuild: Fix the assumed host architecture for cross-built objtool + (fixes FTBFS on at least ppc64) -- Ben Hutchings Thu, 12 Jul 2018 15:16:15 +0100 diff --git a/debian/rules.d/tools/objtool/Makefile b/debian/rules.d/tools/objtool/Makefile index cc2ea9e22..6b42618d3 100644 --- a/debian/rules.d/tools/objtool/Makefile +++ b/debian/rules.d/tools/objtool/Makefile @@ -5,7 +5,7 @@ all: # for multiple targets and add a wrapper, same as for modpost. # objtool explicitly sets CC and LD to be native tools; we need to override # this on the command line to make cross-builds work. - $(MAKE) -C $(top_srcdir)/tools/objtool O=$(CURDIR) ARCH=x86 CC=$(CC) LD=$(CROSS_COMPILE)ld + $(MAKE) -C $(top_srcdir)/tools/objtool O=$(CURDIR) HOSTARCH=$(KERNEL_ARCH) ARCH=x86 CC=$(CC) LD=$(CROSS_COMPILE)ld install: install -D -m755 objtool $(DESTDIR)/$(installdir)/objtool