From patchwork Sat Apr 12 10:13:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 3972821 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7AB5B9F336 for ; Sat, 12 Apr 2014 10:13:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DBDC202A7 for ; Sat, 12 Apr 2014 10:13:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B751720295 for ; Sat, 12 Apr 2014 10:13:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754188AbaDLKNt (ORCPT ); Sat, 12 Apr 2014 06:13:49 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:41702 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754027AbaDLKNs (ORCPT ); Sat, 12 Apr 2014 06:13:48 -0400 Received: by mail-la0-f54.google.com with SMTP id mc6so4241907lab.41 for ; Sat, 12 Apr 2014 03:13:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gM87k4hL55zv0zI4CgcfYWQTuH2VHycMCB8CfAFaJkA=; b=g+nWogFBDRf+7r7gPJJQwcXNMA3ul0sAL/GQlbspyBYHLsA9a0eyOI+jrTVz5HeYD+ Csr38+Kq4q4NYvv2Y7/x57HAJqXs5bFEaXc4mP1qY/RMv5bA4OLShANBfQnLg323phzN Di5jr65onrNDLTtyNDjNLnQipAdtGQ/UHuB9HfPp0bbPewIKkr+GHel5ZJV6AY14bVsV /UQC1j3amd58hphveWvhRkKbv6MUW5tL+FTbo0V58KaCx6AzBifF+YH2KHDW4RcYVoLl houGykOa/DnDWDwZy5UoL9y3encJg+0ku0bZl/cyRqAehoM+J+OhVaxkYjtezgjMVZBC BQNA== X-Gm-Message-State: ALoCoQl14L2inqtYa7wwEjCvMlyqYVnh8KJcwNKjRY4veSh9KLAXbPuGVLYEh+k12iaCB8rpGx6v X-Received: by 10.112.163.69 with SMTP id yg5mr19386524lbb.14.1397297626911; Sat, 12 Apr 2014 03:13:46 -0700 (PDT) Received: from localhost.localdomain (a91-152-78-194.elisa-laajakaista.fi. [91.152.78.194]) by mx.google.com with ESMTPSA id lm5sm9727534lac.13.2014.04.12.03.13.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Apr 2014 03:13:46 -0700 (PDT) From: Fathi Boudra To: linux-kbuild Cc: Michal Marek , Ben Hutchings , Maximilian Attems , Fathi Boudra Subject: [PATCH] builddeb: use $OBJCOPY variable instead of objcopy Date: Sat, 12 Apr 2014 13:13:24 +0300 Message-Id: <1397297604-4271-1-git-send-email-fathi.boudra@linaro.org> X-Mailer: git-send-email 1.9.1 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.3 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 In cross-build environment, we expect to use the cross-compiler objcopy instead of the host objcopy. It fixes following build failures: objcopy --only-keep-debug lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko /srv/build/linux/debian/dbgtmp/usr/lib/debug/lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko objcopy: Unable to recognise the format of the input file `lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko' Signed-off-by: Fathi Boudra Reviewed-by: Ben Hutchings --- scripts/package/builddeb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f46e4dd..152d4d2 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 + $OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module # strip original module from debug symbols - objcopy --strip-debug $module + $OBJCOPY --strip-debug $module # then add a link to those - objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module + $OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module done ) fi