Re: Bug#774129: should dpkg-buildpackage set the cross build profile automatically?
+++ Helmut Grohne [2014-12-29 10:00 +0100]:
> Package: dpkg-dev
> Version: 1.17.23
> Severity: wishlist
> User: email@example.com
> Usertags: rebootstrap
> Some packages need extra Build-Depends when they are cross compiled.
> Here are some examples:
> * src:guile-2.0 needs guile-2.0 to cross-build
> * src:glib2.0 needs libglib2.0-dev:any to cross-build
> * src:autogen needs autogen to cross-build
> * src:flex runs help2man and an easy way to do that is to use the build
> arch flex
> * src:bison also runs help2man and can benefit from build arch bison
> A way to address this need is to use the "cross" build profile. Now I
> am wondering whether dpkg-buildpackage should set the cross build
> profile automatically. The logic for doing so is as simple as: if the
> host architecture differs from the build architecture, enable that
> If dpkg is not the place to add this facility, the place that invokes
> dpkg-buildpackage needs to enable this profile explicitly. That probably
> means that sbuild needs to do this.
The thinking to date has been that this is not a job for the low-level
tool dpkg-buildpackage. That provides the mechanism to set it but the
environment sets things up. So yes, sbuild probably should do this, and
pbuilder, and possibly debuild could/should do this, but I'm leery of
dpkg-buildpackage doing it.
But I could be wrong, and as we integrate this stuff more tightly,
maybe it makes sense to move such functionality into lower-level tools.
I have a feeling that dpkg-buildpackage should do 'policy' level build
things so if the above became policy then dpkg-buildpackage should
probably make sure it gets done. Perhaps the biggest disadvantage is
indeed that if even the low-level build tool does this automatically
then how do you turn it off? Is there is fact no good reason to ever
Principal hats: Linaro, Debian, Wookware, ARM