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
1 This is a testing request aimed at all arches that have differing
2 kernel/userspace bit counts. My short list so far is:
3 - ppc64 - 64/32 (tested myself, but more testing needed)
4 - sparc64 - 64/32
5 - mips64 - 64/32 [1]
6
7 Other possibles (they should be theoretically capable of it, but the
8 profile is marked broken, or doesn't exist in Gentoo presently):
9 - s390x - 64/31
10 - amd64 - 64/32 (the profile is marked as broken)
11 - superh - 64/32
12 - hppa - 64/32
13
14 Additionally, I'd like some testing under pure 32, pure 64, and multilib
15 systems, just to be 100% certain it doesn't break existing
16 functionality. I have tested x86 myself, and had reports that pure ppc64
17 work fine.
18
19 This patch uses multilib.eclass to bring linux-mod support much further
20 forward in allowing kernel modules in the portage tree to be built on
21 64/32 split systems.
22
23 It would be nice to have this in 2006.1 (I suspect catalyst/genkernel
24 could probably benefit greatly from it).
25
26 There's two parts to it:
27 1. get-KERNEL_CC support and usage in linux-mod.eclass
28 2. Profile changes: Each user needs to define KERNEL_ABI, and then
29 CHOST_*, CFLAGS_*, LDFLAGS_* for the value of KERNEL_ABI.
30 For a platform with a biarch compiler, you'd use CFLAGS_xxxx64="-m64"
31 (or 32), and LDFLAGS_xxxx64="-m TARGETNAME".
32 For a platform with two separate compilers (kgcc64), but a single
33 binutils, use the same LDFLAGS, but instead of CFLAGS, do
34 CHOST_xxxx64="......." instead.
35
36 Example for ppc64 with 32-bit userland.
37 +KERNEL_ABI="ppc64"
38 +LDFLAGS_ppc64="-m elf64ppc"
39 +CHOST_ppc64="powerpc64-unknown-linux-gnu"
40
41 Now the bug with the patch:
42 Bug 133382:
43 http://bugs.gentoo.org/show_bug.cgi?id=133382
44
45 Test cases (some of them may not compile if built into your kernel):
46 sys-block/iscsitarget-0.4.13
47 net-wireless/zd1211-80
48 x11-base/x11-drm-20060608
49 sys-fs/cowloop-2.15-r1
50 sys-fs/fuse
51
52 Notes.
53 1. Mips: with your triple ABI stuff, you might want to look very closely
54 at this.
55
56 --
57 Robin Hugh Johnson
58 E-Mail : robbat2@g.o
59 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85

Replies