[pacman-dev] [PATCH] Introduce destarch keyword into makepkg

Allan McRae allan at archlinux.org
Wed Jul 2 00:11:34 EDT 2008

Dan McGee wrote:
> On Tue, Jul 1, 2008 at 8:58 PM, Allan McRae <allan at archlinux.org> wrote:
>> Thomas Bächler wrote:
>>> If destarch is added to a PKGBUILD,
>> I read that as de-starch and was confused for a while...  :)
>>> makepkg sets the architecture of the
>>> resulting package to $destarch instead of $CARCH. This is useful if you
>>> want to cross-create packages for one architecture on the other.
>>> Using
>>> arch=('i686')
>>> destarch='x86_64'
>>> makes it possible to build multilib packages and to build grub without
>>> the export CARCH="x86_64" hack.
>> So when you are building the i686 packages, you have to comment out the
>> destarch value?  I think it would be better to use a flag like -D/--dest
>> x86_64.
> I wanted to make this same point too but I was afraid I interpreted
> the patch wrong. It doesn't seem intuitive to have to comment things
> in and out of the PKGBUILD.
> Of course, it is now just as easy to do:
> CARCH=blah makepkg
> which seems to make this patch not worth it?

But CARCH=blah requires that blah is in the arch array which indicates 
that is can be built on that arch - not the case for grub.

Would this make more sense?
arch=('i686' 'x86_64)

To build for i686 just type "makepkg" on an i686 machine.  To build for 
x86_64, type "makepkg -D x86_64" on an i686 machine.  Typing "makepkg" 
on a x86_64 machine fails.  I think this would be clearer.


More information about the pacman-dev mailing list