From patchwork Mon Jun 2 06:47:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 4280191 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 42E77BEEA7 for ; Mon, 2 Jun 2014 07:16:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B149202EB for ; Mon, 2 Jun 2014 07:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD70C20218 for ; Mon, 2 Jun 2014 07:16:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751991AbaFBHQ3 (ORCPT ); Mon, 2 Jun 2014 03:16:29 -0400 Received: from benson.vm.bytemark.co.uk ([212.110.190.137]:45409 "EHLO benson.vm.bytemark.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751567AbaFBHQ3 (ORCPT ); Mon, 2 Jun 2014 03:16:29 -0400 X-Greylist: delayed 1725 seconds by postgrey-1.27 at vger.kernel.org; Mon, 02 Jun 2014 03:16:28 EDT Received: from cpc22-cmbg14-2-0-cust482.5-4.cable.virginm.net ([86.6.25.227] helo=celaeno.hellion.org.uk) by benson.vm.bytemark.co.uk with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1WrM20-0007u5-4T; Mon, 02 Jun 2014 07:47:40 +0100 Received: from dagon.hellion.org.uk ([192.168.1.7]) by celaeno.hellion.org.uk with smtp (Exim 4.80) (envelope-from ) id 1WrM1x-0007MA-Da; Mon, 02 Jun 2014 07:47:38 +0100 Received: by dagon.hellion.org.uk (sSMTP sendmail emulation); Mon, 02 Jun 2014 07:47:37 +0100 From: Ian Campbell To: Michal Marek , linux-kbuild@vger.kernel.org Cc: Ben Hutchings , maximilian attems , debian-kernel@lists.debian.org, Ian Campbell Subject: [PATCH] deb-pkg: Apply $(CROSS_COMPILE) when calling objcopy Date: Mon, 2 Jun 2014 07:47:37 +0100 Message-Id: <1401691657-12222-1-git-send-email-ijc@hellion.org.uk> X-Mailer: git-send-email 1.9.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allows me to cross build an armhf package from amd64. Signed-off-by: Ian Campbell Acked-by: maximilian attems --- 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