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: Wed, 05 Feb 2014 23:55:19
Message-Id: 201402060055.14340.redlizard@gentoo.org
In Reply to: Re: [gentoo-alt] Restructuring the bootstrap (or: getting rid of gcc 4.2) by Fabian Groffen
1 On Monday 03 February 2014 10:16:09 Fabian Groffen wrote:
2 > On 02-02-2014 20:35:28 +0100, Fabian Groffen wrote:
3 > > Let me see if I can build latest gcc on Solaris for you on a vanilla
4 > > system.
5 >
6 > On an OpenIndiana box (that already comes with a more decent toolchain
7 > than e.g. Solaris 10):
8 >
9 > [ra:/export/gentoo/temp]64 % uname -a
10 > SunOS ra 5.11 oi_151a7 i86pc i386 i86pc Solaris
11 > [ra:/export/gentoo/temp]64 % tar -jxf
12 > /export/gentoo/distfiles/gcc-4.7.3.tar.bz2
13 > [ra:/export/gentoo/temp]64 % env -i /bin/bash -l
14 > bash: keychain: command not found
15 > bash-4.0$ pwd
16 > /export/gentoo/temp
17 > bash-4.0$ cd gcc-4.7.3/
18 > bash-4.0$ ./configure
19 > checking build system type... i386-pc-solaris2.11
20 > checking host system type... i386-pc-solaris2.11
21 > checking target system type... i386-pc-solaris2.11
22 > checking for a BSD-compatible install... /bin/ginstall -c
23 > checking whether ln works... yes
24 > checking whether ln -s works... yes
25 > checking for a sed that does not truncate output... /usr/gnu/bin/sed
26 > checking for gawk... gawk
27 > checking for libitm support... yes
28 > checking for gcc... gcc
29 > checking for C compiler default output file name... a.out
30 > checking whether the C compiler works... yes
31 > checking for suffix of object files... o
32 > checking whether we are using the GNU C compiler... yes
33 > checking whether gcc accepts -g... yes
34 > checking for gcc option to accept ISO C89... none needed
35 > checking for g++... g++
36 > checking whether we are using the GNU C++ compiler... yes
37 > checking whether g++ accepts -g... yes
38 > checking for gnatbind... no
39 > checking for gnatmake... no
40 > checking whether compiler driver understands Ada... no
41 > checking how to compare bootstrapped objects... cmp --ignore-initial=16
42 > $$f1 $$f2
43 > checking for objdir... .libs
44 > checking for the correct version of gmp.h... no
45 > configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC
46 > 0.8.0+.
47 > Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
48 > their locations. Source code for these libraries can be found at
49 > their respective hosting sites as well as at
50 > ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
51 > http://gcc.gnu.org/install/prerequisites.html for additional info. If
52 > you obtained GMP, MPFR and/or MPC from a vendor distribution package,
53 > make sure that you have installed both the libraries and the header
54 > files. They may be located in separate packages.
55 >
56 > Basically the journey already ends here.
57 >
58 > I went a bit through gmp and mpfr, but they depend on eachother, and
59 > this is basically where the bootstrap process is carefully crafted the
60 > way it is, because stuff depends on stuff and gmp for instance compiles,
61 > but creates a 64-bits library (for some reason), while plain invoked
62 > configure for gcc will target a 32-bits compiler, so it will break down
63 > the line.
64 >
65 > Fabian
66
67 Sure, because you used neither the CFLAGS and LDFLAGS the bootstrap script
68 uses to find the right library versions, nor all the wizardry that
69 toolchain.eclass does to build the right toolchain. If you build things the
70 way the bootstrap script does, using portage, things should work.
71
72 Case in point: after some unrelated fixes to the bootstrap script (mostly
73 regarding baselayout-prefix, which you seem to have fixed independently for
74 the mainline bootstrap a few days ago) my bootstrap now works flawlessly on
75 solaris 10 x86 (using gcc 3.4), as well as SLES :)
76
77 I'll test on a couple of other solaris-ish versions (OpenIndiana, solaris 11,
78 maybe solaris sparc if I can get my hands on one) and then it's on to tougher
79 platforms!
80
81 -- Ruud

Replies