From patchwork Mon Oct 11 14:21:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastien Jan X-Patchwork-Id: 67427 X-Patchwork-Delegate: tim.gardner@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 71C0DB70A9 for ; Tue, 12 Oct 2010 01:22:22 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5JGX-0006dp-2n; Mon, 11 Oct 2010 15:22:13 +0100 Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1P5JGU-0006d9-5o for kernel-team@lists.ubuntu.com; Mon, 11 Oct 2010 15:22:10 +0100 Received: from source ([209.85.214.177]) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKTLMdkNStlHmt+tIJpi2PbehxX5lnqPt4@postini.com; Mon, 11 Oct 2010 07:22:10 PDT Received: by mail-iw0-f177.google.com with SMTP id 5so243576iwn.36 for ; Mon, 11 Oct 2010 07:22:08 -0700 (PDT) Received: by 10.231.19.136 with SMTP id a8mr4579627ibb.86.1286806920243; Mon, 11 Oct 2010 07:22:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.201.137 with HTTP; Mon, 11 Oct 2010 07:21:44 -0700 (PDT) In-Reply-To: <4CA4CD09.5080801@canonical.com> References: <4CA40B70.7060807@canonical.com> <20100930154114.GA22500@shadowen.org> <4CA4CD09.5080801@canonical.com> From: "Jan, Sebastien" Date: Mon, 11 Oct 2010 16:21:44 +0200 Message-ID: Subject: Re: Cross compile rules update To: tim.gardner@canonical.com Cc: Loic Minier , Kernel team list X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Hi Tim, On Thu, Sep 30, 2010 at 7:46 PM, Tim Gardner wrote: > On 09/30/2010 09:41 AM, Andy Whitcroft wrote: >> >> I am slightly concerned that this one dh_ control needs the arch and >> none of the others do.  Might we be better off exporting them at the >> time they are defined; pretty sure there is a way to say that you want >> that when you set the values. >> >> Otherwise it does look saneish.  It is unfortuanate you need to zap the >> tools unconditionally, perhaps we should leave that to the caller. >> >> -apw > > It turns out the dh_gencontrol line changes were superfluous. It didn't work > anyways with the 'fakeroot debian/rules binary arch=armel' invocation. It > only works using 'dpkg-buildpackage -aarmel' which sets the internal notion > of HOST arch that dh_gencontrol uses. > > Loic - I've made the CROSS_COMPILE and do_tools changes as requested. I am testing the ti-omap4 branch, and cannot cross-compile anymore with CS since the introduction of this patch. My CROSS_COMPILE variable seems ignored (using CROSS_COMPILE=arm-none-linux-gnueabi- dpkg-architecture -B -aarmel, or fakeroot debian/rules). I was able to cross-compile with the following hack: Am I using a wrong build command our could there be something wrong with the makefile? Thanks, Sebastien diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 66d3900..b4d7a8a 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -106,9 +106,13 @@ endif # an x86'en schroot. This is the only way to build all of the packages # (except for tools). # +ifneq ($(CROSS_COMPILE),) + CROSS_COMPILE := CROSS_COMPILE=$(CROSS_COMPILE) +else ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CROSS_COMPILE ?= CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- endif +endif abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(revision)/$(arch) prev_abidir := $(CURDIR)/$(DEBIAN)/abi/$(release)-$(prev_revision)/$(arch)