Override dh_gencontrol architecture

Steve Langasek steve.langasek at linaro.org
Wed Sep 29 18:24:32 UTC 2010


On Wed, Sep 29, 2010 at 11:22:52AM -0600, Tim Gardner wrote:
> >Cross-building of Debian packages is meant to be handled by using the
> >'dpkg-buildpackage -a${target_arch}' interface.  This sets the environment
> >variables shown in the output of 'dpkg-architecture -a${target_arch}'.

> Do you have an example of a package that correctly cross builds?

Sure, u-boot-linaro is one.  Many other packages do also, requiring nothing
more than passing $(DEB_HOST_GNU_TYPE) to ./configure.  I guess the kernel
case is a bit more complex.

> The issue I'm having with the kernel is that there are some native gcc
> steps that compile tools executed during the build as well as some cross
> compile steps.  If I can correctly determine the schroot host arch as well
> as the target arch, then I think I can accommodate the various compile
> steps.

I would be surprised if you need to pass the native architecture into the
kernel build anywhere, since for the compile tools we should just use gcc.
Probably just checking for equality between the host and build archs is
sufficient?  So something like

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
archs=$(DEB_HOST_GNU_TYPE)
endif

in debian/rules - but that's not quite right, and I can't see at a glance
where the $(arch) variable used in debian/rules is being set.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20100929/cf6eaf19/attachment.sig>


More information about the kernel-team mailing list