Re: PATCH: ARCH in builddeb

From: Frans Pop
Date: Wed Sep 16 2009 - 10:19:47 EST


On Monday 14 September 2009, Frans Pop wrote:
> On Monday 14 September 2009, Wei Chong Tan wrote:
> > I was using "make ARCH=i386 deb-pkg" in the kernel on a 64bit machine
> > and found out that the .deb package created was _amd64.deb.
> > Consequently, I modify the builddeb script to take into account the
> > ARCH environment variable.
>
> Thanks for the patch. I'd like to give it some testing though as I fear
> it may break one other use case that currently somehow does work
> correctly.
>
> If I cross-compile for arm with EABI set in the config, the script
> currently correctly generates an armel package (probably through
> dpkg-cross).
>
> Possibly your change would override that and change it to arm. I don't
> know for sure it will go wrong, but it does need testing. I'll let you
> know.

Yes, it is as I feared. Your patch results in an "arm" package when I do a
cross-build for "armel" (for which I must of course set ARCH to "arm" as
armel is not a valid Linux architecture).

I agree that being able to build i386 on amd64 is a valuable option and I
have actually run into that issue myself (and solved it by building in an
i386 chroot).

A possible solution could be to check that CROSS_COMPILE is *not* set, but
I'm not sure if that would be the correct solution. Input from others on
this would be welcome.

Cheers,
FJP
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/