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 <asm/bitsperlong.h>) for the build architecture.
This commit is contained in:
Ben Hutchings 2018-07-12 17:54:58 +01:00
parent 1ce0efc405
commit e740d4cf79
2 changed files with 3 additions and 1 deletions

2
debian/changelog vendored
View File

@ -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 <ben@decadent.org.uk> Thu, 12 Jul 2018 15:16:15 +0100

View File

@ -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