[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [buildd-tools-devel] Bug#610689: Bug#610689: sbuild: cross support



On Sat, Jan 22, 2011 at 07:03:48PM +0000, Roger Leigh wrote:
> On Fri, Jan 21, 2011 at 12:09:55PM +0000, Hector Oron wrote:
> >   I would love sbuild to gain the ability to handle cross builds.
> […]
> 
> Thanks for the informative explanation, it has helped to make the
> problem a bit clearer for me.
> 
> > It seems that sbuild triggers dpkg --print-architecture to find out chroot architecture, but when doing cross it should try to follow dpkg-architecture's DEB_HOST_ARCH.
> > 
> > Would it be possible to modify Build.pm in some way, either calling dpkg-architecture or autodetecting -a$arch has been passed and it should follow other architecture changes file?
> 
> I think we should add two additional options:
>   --host   select host arch
>   --build  select build arch
> (or whatever are most commonly used in existing Debian tools; these are
> from autoconf configure) and have "--arch=foo" be equivalent to
> "--host=foo --build=foo".

I've attached a patch (against sbuild git master, also on the
cross-build branch of git://git.debian.org/users/rleigh/sbuild.git)
which adds --host and --build options and then uses the correct
host or build arch in the appropriate places.  While I've tested
everything still works fine for normal non-cross builds, this will
need testing for cross builds to make sure I've not got the
host/build arch mixed up in any places (since I will not have
picked any error up when they are both the same).


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature


Reply to: