Gentoo Archives: gentoo-alt

From: Ruud Koolen <redlizard@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 17:36:33
Message-Id: 201402021834.38967.redlizard@gentoo.org
In Reply to: Re: [gentoo-alt] Restructuring the bootstrap (or: getting rid of gcc 4.2) by Fabian Groffen
1 On Sunday 02 February 2014 10:04:39 Fabian Groffen wrote:
2 > On 02-02-2014 03:31:51 +0100, Ruud Koolen wrote:
3 > > This process avoids the problem of host-built libraries, as it makes a
4 > > sharp distinction between host-built code and prefix-built code; all
5 > > host-built code goes in $EPREFIX/tmp, and all prefix-built code goes in
6 > > $EPREFIX. This means there is nothing stopping us from using libraries
7 > > in the host-built code; host-built libraries end up in $EPREFIX/tmp, and
8 > > only host-built binaries (and libraries) will link to it, so ABI
9 > > incompatibilities aren't a problem. Thus, the latest version of gcc and
10 > > friends can be used, avoiding many problems. Similarly, the $EPREFIX/tmp
11 > > toolchain can build $EPREFIX libraries without problems.
12 >
13 > I'm affraid you don't quite understand why the bootstrap uses older gcc
14 > versions.  On non Linux platforms (what bootstrap-prefix.sh is tuned
15 > towards) newer versions of gcc require libs (as you noted) that require
16 > newer gcc versions than the host toolchain provides.  So, you simply
17 > cannot compile later versions with the tools you've got, hence you'll
18 > have to carefully go up in steps until your toolchain has been upgraded
19 > enough to compile the beautiful tools and libraries we like to have.
20
21 Can you elaborate? As far as I know, gmp/mpfr/mpc will compile everywhere
22 (unlike, say, glibc, which really does have a recent-gcc dependency). Can you
23 give a specific example of these libraries not compiling on any platform
24 prefix supports?
25
26 > > architectures (which was causing problems in supporting newer android
27 > > systems); and in general, old packages have a nasty tendency to bitrot,
28 > > making things unnecessarily flaky (bash-4.0 and 4.1 accidentally got
29 > > removed from the tree recently, breaking the bootstrap).
30 >
31 > I've fixed the odd bash dependency yesterday.  I removed some hacks as
32 > well which were no longer necessary.  A bootstrap on x86-solaris
33 > succeeded after my fixes.
34
35 Nice.
36
37 > > - It keeps the final prefix clean. The current process bootstraps a
38 > > portage into $EPREFIX, and overwrites it later with a portage-built
39 > > portage; these two
40 >
41 > The only pollution should be portage + bash symlink.
42 >
43 > > portages need to be the exact same version, or old junk will end up in
44 > > the prefix that doesn't belong to any package, which can go wrong if
45 > > using LATEST_TREE_YES. In my process, nothing ever ends up in $EPREFIX
46 > > that portage didn't put there. Together with my earlier work to get rid
47 > > of the stage2 profile hackery, this will keep $EPREFIX completely
48 > > pollution-free.
49 >
50 > I doubt it can be.
51
52 We'll see :)
53
54 > > - No, it doesn't need to build more compilers than the current method.
55 > > The current bootstrap proces builds gcc4.2, upgrades to gcc 4.7 (or
56 > > something), and rebuilds it during emerge -e @system; my process builds
57 > > a gcc in $EPREFIX/tmp, uses it to build a gcc in $EPREFIX, and rebuilds
58 > > it during emerge -e @system.
59 > >
60 > > I propose adopting this new bootstrap system for prefix, both in order to
61 > > improve the regular prefix bootstrap process, and to allow RAP work to
62 > > continue (which, by the way, is nearing the end of the road). I have an
63 > > almost-completely-working(1) implementation of it at the ready (2); when
64 > > it's properly ready in a few days, if you all agree, I want to emit a
65 > > call-for- testing to make sure it actually works as promised on all
66 > > platforms (the only one for which I have been able to do proper testing
67 > > so far is linux), and get it operational.
68 > >
69 > > What say you, prefix people? Is this the proper way forward?
70 >
71 > I'm not against this, but I think hacks will have to remain in order to
72 > allow Darwin and Solaris (amongst others) targets to stay working.  In
73 > particular the case of outdated tools is something you seem not to take
74 > into account, which severly limits your options.
75 >
76 > Fabian
77
78 But gcc and friends are specifically designed to be buildable on any
79 ridiculous old system, and the use of other tools hasn't changed between my
80 bootstrap process and the current one. Again, can you elaborate and give a
81 concrete example?
82
83 -- Ruud

Replies

Subject Author
Re: [gentoo-alt] Restructuring the bootstrap (or: getting rid of gcc 4.2) Fabian Groffen <grobian@g.o>
RE: [gentoo-alt] Restructuring the bootstrap (or: getting rid of gcc 4.2) Francois Bissey <francois.bissey@×××××××××××××.nz>