Patchwork [2/2] LINARO: Use KBUILD_SCRIPTROOT to cross build scripts

login
register
mail settings
Submitter Paolo Pisati
Date March 23, 2012, 12:31 p.m.
Message ID <1332505883-1301-3-git-send-email-paolo.pisati@canonical.com>
Download mbox | patch
Permalink /patch/148433/
State New
Headers show

Comments

Paolo Pisati - March 23, 2012, 12:31 p.m.
From: John Rigby <john.rigby@linaro.org>

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Sebastien Jan <s-jan@ti.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 debian/rules.d/2-binary-arch.mk |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 52b2e57..3d42e34 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -10,6 +10,8 @@  build_cd =
 build_O  = O=$(builddir)/build-$*
 endif
 
+kbsr      = $(builddir)/build-$*
+
 $(stampdir)/stamp-prepare-%: config-prepare-check-%
 	@touch $@
 $(stampdir)/stamp-prepare-tree-%: target_flavour = $*
@@ -178,7 +180,7 @@  endif
 		sed -e 's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/g' > \
 		$(hdrdir)/.config
 	chmod 644 $(hdrdir)/.config
-	$(kmake) O=$(hdrdir) -j1 silentoldconfig prepare scripts
+	$(kmake) HOSTCC=$(CROSS_COMPILE)gcc KBUILD_SCRIPTROOT=$(kbsr) O=$(hdrdir) -j1 silentoldconfig prepare scripts
 	# We'll symlink this stuff
 	rm -f $(hdrdir)/Makefile
 	rm -rf $(hdrdir)/include2