Re: [PATCH] kbuild, deb-pkg: fix Architecture field when cross compiling

Michal Marek
2010-11-03T22:57:10Z

On 2.11.2010 00:31, Asbjoern Sloth Toennesen wrote:
> If the environment variable CROSS_COMPILE is set, override
> the Architecture control field, based on the value of the
> ARCH environment variable.
>
> With this patch the following make command:
>
> make CROSS_COMPILE='' ARCH=i386 deb-pkg
>
> will output an i386 Debian package instead of an amd64 one,
> when run on amd64 machine.

I know very little about debian packaging, but shouldn't this be done in
all cases, regardless of CROSS_COMPILE being set or not? You even show
in the above example that in some cases you don't need CROSS_COMPILE to
build a kernel for a different architecture. make rpm-pkg seems to
suffer from the same problem, btw.

Michal