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

Bug#379090: preparation for 2.6.18-6 kernel upload on monday 20th of november 2006.



Bastian Blank <waldi@debian.org> wrote:
> On Sat, Nov 18, 2006 at 07:12:49AM +0100, Goswin von Brederlow wrote:
> > #379090

> The patch breaks crosscompilation and other things.

> | diff -u linux-2.6.16-2.6.16/debian/arch/i386/xen-vserver/defines linux-2.6.16-2.6.16/debian/arch/i386/xen-vserver/defines
> | --- linux-2.6.16-2.6.16/debian/arch/i386/xen-vserver/defines
> | +++ linux-2.6.16-2.6.16/debian/arch/i386/xen-vserver/defines
> | @@ -12 +12,9 @@
> | +kernel-arch: i386
> |  
> | +[amd64]
> | +class: AMD64 / EM64T SMP
> | +longclass: 64bit multi-processor AMD Athlon64/Opteron / Intel EM64T models
> | +KPKG-ARCH: amd64
> | +recommends: libc6-i686
> | +kpkg-arch: amd64

> kpkg always gets the debian arch of the system it compiles for.
> Overwriting this is not allowed.

> Xen is inappropriate as they need matching tools.

kpkg is the arch the _kernel_ compiles for, hence the _K_.

See also man make-kpkg:

| The value should be whatever DEB_HOST_ARCH_CPU contains when
| dpkg-architecture is run on the target machine, or it can be an other
| architecture in a multi-arch set (like i386/amd64).

Which is what we do here.


Anyway, leave the xen stuff disabled if that makes problems for
you. As said in this bugreport before we probably don't need it.

> | diff -u linux-2.6.16-2.6.16/debian/rules.real linux-2.6.16-2.6.16/debian/rules.real
> | --- linux-2.6.16-2.6.16/debian/rules.real
> | +++ linux-2.6.16-2.6.16/debian/rules.real
> | @@ -35,7 +35,11 @@
> |  # replaced by the flavour for which the command is run. 
> |  #
> |  kpkg_image := make-kpkg
> | -kpkg_image += --arch '$(ARCH)'
> | +ifdef KPKG_ARCH
> | +  kpkg_image += --arch '$(KPKG_ARCH)' --cross-compile='-'
> | +else
> | +  kpkg_image += --arch '$(ARCH)'
> | +endif
> |  kpkg_image += --stem linux
> |  ifneq ($(INITRAMFS),False)
> |    kpkg_image += --initrd

> No. The cross compilation stuff is set intern and must not be overwriten
> by the rules.

Yes it must.

We are building for a multi-arch set here and the synatx for that is
to set the architecture but not to cross-compile. --cross-compile='-'
does that.

Without that flag the build tries to use x86_64-linux-gnu-gcc, which
is not available on i386. Only gcc -m64 is. The kernel adds -m64 where
appropriate automtically.

> Bastian

MfG
        Goswin



Reply to: