Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Restructuring the bootstrap (or: getting rid of gcc 4.2)
Date: Sun, 02 Feb 2014 09:04:56
Message-Id: 20140202090439.GC16061@gentoo.org
In Reply to: [gentoo-alt] Restructuring the bootstrap (or: getting rid of gcc 4.2) by Ruud Koolen
1 On 02-02-2014 03:31:51 +0100, Ruud Koolen wrote:
2 > This process avoids the problem of host-built libraries, as it makes a sharp
3 > distinction between host-built code and prefix-built code; all host-built code
4 > goes in $EPREFIX/tmp, and all prefix-built code goes in $EPREFIX. This means
5 > there is nothing stopping us from using libraries in the host-built code;
6 > host-built libraries end up in $EPREFIX/tmp, and only host-built binaries (and
7 > libraries) will link to it, so ABI incompatibilities aren't a problem. Thus,
8 > the latest version of gcc and friends can be used, avoiding many problems.
9 > Similarly, the $EPREFIX/tmp toolchain can build $EPREFIX libraries without
10 > problems.
11
12 I'm affraid you don't quite understand why the bootstrap uses older gcc
13 versions. On non Linux platforms (what bootstrap-prefix.sh is tuned
14 towards) newer versions of gcc require libs (as you noted) that require
15 newer gcc versions than the host toolchain provides. So, you simply
16 cannot compile later versions with the tools you've got, hence you'll
17 have to carefully go up in steps until your toolchain has been upgraded
18 enough to compile the beautiful tools and libraries we like to have.
19
20 > As far as I can see, the advantages of my bootstrap method are as follows:
21 > - It gets rid of all reliances on old package versions, and gcc in particular.
22
23 As pointed out above, impossible to remove.
24
25 > As explained above, gcc 4.2 has bugs that won't be fixed that are causing
26 > actual practical problems (#262653, #490774), and has a dated set of supported
27
28 I'm fine with lifting the limits for platforms that provide the
29 necessary up-to-date tools somehow.
30
31 > architectures (which was causing problems in supporting newer android
32 > systems); and in general, old packages have a nasty tendency to bitrot, making
33 > things unnecessarily flaky (bash-4.0 and 4.1 accidentally got removed from the
34 > tree recently, breaking the bootstrap).
35
36 I've fixed the odd bash dependency yesterday. I removed some hacks as
37 well which were no longer necessary. A bootstrap on x86-solaris
38 succeeded after my fixes.
39
40 > - It keeps the final prefix clean. The current process bootstraps a portage
41 > into $EPREFIX, and overwrites it later with a portage-built portage; these two
42
43 The only pollution should be portage + bash symlink.
44
45 > portages need to be the exact same version, or old junk will end up in the
46 > prefix that doesn't belong to any package, which can go wrong if using
47 > LATEST_TREE_YES. In my process, nothing ever ends up in $EPREFIX that portage
48 > didn't put there. Together with my earlier work to get rid of the stage2
49 > profile hackery, this will keep $EPREFIX completely pollution-free.
50
51 I doubt it can be.
52
53 > - It gets rid of a large part of the stage3 hacks, most of which are due to
54 > either mixing of $EPREFIX/tmp and $EPREFIX or gcc 4.2.
55
56 stage3 currently is a careful ordered emerge process (little to no
57 hacks, apart from getting dependencies ignored), syncing the tree,
58 upgrading gcc to latest, and emerging everything from system that hasn't
59 been installed yet.
60
61 > - No, it doesn't need to build more compilers than the current method. The
62 > current bootstrap proces builds gcc4.2, upgrades to gcc 4.7 (or something),
63 > and rebuilds it during emerge -e @system; my process builds a gcc in
64 > $EPREFIX/tmp, uses it to build a gcc in $EPREFIX, and rebuilds it during
65 > emerge -e @system.
66 >
67 > I propose adopting this new bootstrap system for prefix, both in order to
68 > improve the regular prefix bootstrap process, and to allow RAP work to
69 > continue (which, by the way, is nearing the end of the road). I have an
70 > almost-completely-working(1) implementation of it at the ready (2); when it's
71 > properly ready in a few days, if you all agree, I want to emit a call-for-
72 > testing to make sure it actually works as promised on all platforms (the only
73 > one for which I have been able to do proper testing so far is linux), and get
74 > it operational.
75 >
76 > What say you, prefix people? Is this the proper way forward?
77
78 I'm not against this, but I think hacks will have to remain in order to
79 allow Darwin and Solaris (amongst others) targets to stay working. In
80 particular the case of outdated tools is something you seem not to take
81 into account, which severly limits your options.
82
83 Fabian
84
85
86 --
87 Fabian Groffen
88 Gentoo on a different level

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies