public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy
@ 2014-06-02  6:47 Ian Campbell
  2014-06-02  7:32 ` maximilian attems
  2014-06-02  9:29 ` Fathi Boudra
  0 siblings, 2 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-02  6:47 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild
  Cc: Ben Hutchings, maximilian attems, debian-kernel, Ian Campbell

Allows me to cross build an armhf package from amd64.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
---
 scripts/package/builddeb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index f46e4dd..c22ab79 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
 			for module in $(find lib/modules/ -name *.ko); do
 				mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
 				# only keep debug symbols in the debug file
-				objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
+				${CROSS_COMPILE}objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
 				# strip original module from debug symbols
-				objcopy --strip-debug $module
+				${CROSS_COMPILE}objcopy --strip-debug $module
 				# then add a link to those
-				objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
+				${CROSS_COMPILE}objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
 			done
 		)
 	fi
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-02  9:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02  6:47 [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy Ian Campbell
2014-06-02  7:32 ` maximilian attems
2014-06-02  9:29 ` Fathi Boudra
2014-06-02  9:39   ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox