aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2018-07-06 04:36:21 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-07-06 04:36:21 +0100
commit4fd24e2fc57f0ee673dda1cbc9619c379d34c21d (patch)
tree84e0741211fa9275400f4e1bf0e00d3c75367393
parent999f952b7405fc9715adc0f919a19d24f9aa8d1e (diff)
downloadkernel_replicant_linux-4fd24e2fc57f0ee673dda1cbc9619c379d34c21d.tar.gz
kernel_replicant_linux-4fd24e2fc57f0ee673dda1cbc9619c379d34c21d.tar.bz2
kernel_replicant_linux-4fd24e2fc57f0ee673dda1cbc9619c379d34c21d.zip
linux-tools: Fix cross-build of objtool
objtool is normally built and used during the kernel build process, in which case it should always be built as a native executable. But when we build it for linux-tools it should match the target architecture. We need to override the CC and LD variables to make this work.
-rw-r--r--debian/changelog4
-rw-r--r--debian/rules.d/tools/objtool/Makefile4
2 files changed, 7 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 1468010741c4..7b71cfd57847 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,11 @@
linux (4.17.3-2) UNRELEASED; urgency=medium
+ [ Sjoerd Simons ]
* [armhf] DRM: Enable CONFIG_DRM_IMX_PARALLEL_DISPLAY
+ [ Ben Hutchings ]
+ * linux-tools: Fix cross-build of objtool
+
-- Sjoerd Simons <sjoerd@debian.org> Wed, 04 Jul 2018 10:25:57 +0200
linux (4.17.3-1) unstable; urgency=medium
diff --git a/debian/rules.d/tools/objtool/Makefile b/debian/rules.d/tools/objtool/Makefile
index 532e5b793488..cc2ea9e2201d 100644
--- a/debian/rules.d/tools/objtool/Makefile
+++ b/debian/rules.d/tools/objtool/Makefile
@@ -3,7 +3,9 @@ include $(top_rulesdir)/Makefile.inc
all:
# For now, only supported target architecture is x86. Later we'll need to build
# for multiple targets and add a wrapper, same as for modpost.
- $(MAKE) -C $(top_srcdir)/tools/objtool O=$(CURDIR) ARCH=x86
+# 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
install:
install -D -m755 objtool $(DESTDIR)/$(installdir)/objtool