Gentoo Archives: gentoo-alt

From: Ruud Koolen <redlizard@×××××××××.nl>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Re: Ideas for this year's Google Summer of Code
Date: Mon, 08 Apr 2013 05:26:52
Message-Id: 201304080726.47189.redlizard@redlizard.nl
In Reply to: [gentoo-alt] Re: Ideas for this year's Google Summer of Code by heroxbd
1 On Monday 08 April 2013 06:26:07 heroxbd wrote:
2 > redlizard's gentoo-prefix-libc was tried out and I have revised the
3 > proposal based on the trial.
4 >
5 > http://www.awa.tohoku.ac.jp/~benda/projects/android.html
6 >
7 > Details of how glibc is included in Gentoo Prefix are discussed. A new
8 > section of bootstraping by cross-compilation is added.
9 >
10 > Yours,
11 > Benda
12
13 Nice. A few comments:
14
15 > Though we could patch gcc headers to redefine the default standard run time
16 > linker location, the same ld-wrapper mechanism can be used to inject things
17 > like "–dynamic-linker=${EPREFIX}/lib/ld-linux.so.2". The latter solution
18 > will make switching between rpath and prefix-libc variants of Gentoo Prefix
19 > easier.
20
21 Note that gentoo-prefix-libc also has different settings on the compiler
22 itself, like not having /usr/include in the default include path. Switching
23 linker configurations will not change that.
24
25 > It could be hard to bootstrap Gentoo Prefix on Android. One possible way is
26 > to install a native full distribution and then bootstrap a Gentoo Prefix
27 > with libc. We could distribute precompiled Gentoo Prefix on Google Play for
28 > the general public.
29
30 Zero_Chaos bootstrapped his install by first unpacking a plain gentoo tarball
31 into a chroot, and bootstrapping prefix(-libc) from within that chroot.
32 Afterwards, the prefix install could be moved out of the chroot.
33
34 > redlizard's gentoo-prefix-libc has cross bootstraping in mind, with the hope
35 > of running uclibc-based Gentoo Prefix on Android. The details, however,
36 > still call for much effort.
37
38 While the local-libc architecture allows for arbitrary cross compilation
39 bootstraps, the current gentoo-prefix-libc bootstrap script only works for
40 cross compilations to architectures runtime compatible with the host -- amd64
41 to x86, arm hardfp to arm softfp, etc. In other words, the host processor
42 should still be able to run the target executables. This can be changed to
43 support real cross compilation, but this will probably be a nontrivial
44 addition.
45
46 > It would be very nice if crossdev could produce cross toolchain in Gentoo
47 > Prefix by a single command.
48
49 I tried the same, and accomplishing this would make the bootstrap process a
50 whole lot easier. It would basically reduce the bootstrap-prefix.sh process
51 to:
52
53 - Manually bootstrap stage1 tools into some temporary directory
54 (${EPREFIX}/tmp).
55 - Manually bootstrap portage into ${EPREFIX}/tmp (!).
56 - Manually bootstrap crossdev into ${EPREFIX}/tmp.
57 - Use crossdev to build a cross compiler that targets the desired architecture
58 (which need not be runtime-compatible with the host architecture!)
59 - env PORTAGE_OVERRIDE_EPREFIX=${EPREFIX} emerge -e @system.
60
61 -- Ruud

Replies

Subject Author
Re: [gentoo-alt] Re: Ideas for this year's Google Summer of Code heroxbd <heroxbd@×××××.com>