Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Test request: linux-mod support for arches with 64-bit kernel/32-bit userland
Date: Tue, 04 Jul 2006 10:12:29
Message-Id: 20060704100853.GH10574@curie-int.vc.shawcable.net
This is a testing request aimed at all arches that have differing
kernel/userspace bit counts. My short list so far is:
- ppc64 - 64/32 (tested myself, but more testing needed)
- sparc64 - 64/32
- mips64 - 64/32 [1]

Other possibles (they should be theoretically capable of it, but the
profile is marked broken, or doesn't exist in Gentoo presently):
- s390x - 64/31
- amd64 - 64/32 (the profile is marked as broken)
- superh - 64/32
- hppa - 64/32

Additionally, I'd like some testing under pure 32, pure 64, and multilib
systems, just to be 100% certain it doesn't break existing
functionality. I have tested x86 myself, and had reports that pure ppc64
work fine.

This patch uses multilib.eclass to bring linux-mod support much further
forward in allowing kernel modules in the portage tree to be built on
64/32 split systems.

It would be nice to have this in 2006.1 (I suspect catalyst/genkernel
could probably benefit greatly from it).

There's two parts to it:
1. get-KERNEL_CC support and usage in linux-mod.eclass
2. Profile changes: Each user needs to define KERNEL_ABI, and then
   CHOST_*, CFLAGS_*, LDFLAGS_* for the value of KERNEL_ABI.
   For a platform with a biarch compiler, you'd use CFLAGS_xxxx64="-m64"
   (or 32), and LDFLAGS_xxxx64="-m TARGETNAME".
   For a platform with two separate compilers (kgcc64), but a single
   binutils, use the same LDFLAGS, but instead of CFLAGS, do
   CHOST_xxxx64="......." instead.

Example for ppc64 with 32-bit userland.
+KERNEL_ABI="ppc64"
+LDFLAGS_ppc64="-m elf64ppc"
+CHOST_ppc64="powerpc64-unknown-linux-gnu"

Now the bug with the patch:
Bug 133382:
http://bugs.gentoo.org/show_bug.cgi?id=133382

Test cases (some of them may not compile if built into your kernel):
sys-block/iscsitarget-0.4.13
net-wireless/zd1211-80
x11-base/x11-drm-20060608
sys-fs/cowloop-2.15-r1
sys-fs/fuse

Notes.
1. Mips: with your triple ABI stuff, you might want to look very closely
   at this.

-- 
Robin Hugh Johnson
E-Mail     : robbat2@g.o
GnuPG FP   : 11AC BA4F 4778 E3F6 E4ED  F38E B27B 944E 3488 4E85

Replies