Gentoo Archives: gentoo-amd64

From: Dieter Ries <clip2@×××.de>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: About gcc 4.1.1
Date: Thu, 31 Aug 2006 19:46:31
Message-Id: 200608312144.00339.clip2@gmx.de
In Reply to: [gentoo-amd64] Re: About gcc 4.1.1 by Duncan <1i5t5.duncan@cox.net>
1 What is this emerge libtool? I didnt know about it and just did a
2 emerge gcc
3 gcc-config
4 emerge -e system
5
6 now i am going to start emerge -e world.
7
8 cu
9 Dieter
10
11
12 Am Donnerstag 31 August 2006 20:39 schrieb Duncan:
13 > Bob Slawson <bslawson@×××××××××××.net> posted
14 > 44F7199F.6030604@×××××××××××.net, excerpted below, on Thu, 31 Aug 2006
15 >
16 > 13:17:19 -0400:
17 > > Dieter Ries wrote:
18 > >> OK so there it is, gcc 4.1.1 is stable.
19 > >>
20 > >> i just emerged it and switched gcc-config to 4.1.1.
21 > >> does it make sense to recompile gcc 4.1.1 with gcc 4.1.1?
22 > >> (do you know what i mean?
23 > >
24 > > No. As part of the gcc build process, the new gcc is used to compile
25 > > itself. 'Stage 1'
26 > > uses an existing compiler to compile the new source to 'xgcc'. Then in
27 > > 'stage 2',
28 > > 'xgcc' compiles the new source to 'gcc', the compiler is compiling
29 > > itself.
30 >
31 > Actually, while you are correct about the gcc build process, the Gentoo
32 > Linux gcc upgrade guide [1] DOES recommend rebuilding it, but as part of a
33 > larger full system rebuild.
34 >
35 > Quoting the gist of the general instructions:
36 >
37 > Code Listing 2.1: Upgrading GCC
38 > # emerge -uav gcc
39 >
40 > (Please substitute "i686-pc-linux-gnu-4.1.1" with the GCC
41 > version and CHOST settings you've upgraded to:)
42 > # gcc-config i686-pc-linux-gnu-4.1.1
43 > # source /etc/profile
44 >
45 > If you upgraded from gcc 3 to 4 (e.g. from 3.4.6 to 4.1.1 in this
46 > example) you will have to run fix_libtool_files.sh manually
47 > # fix_libtool_files.sh 3.4.6
48 >
49 > (Rebuilding libtool)
50 > # emerge --oneshot -av libtool
51 >
52 > To be completely safe that your system is in a sane state, you must
53 > rebuild the toolchain and then world to make use of the new compiler.
54 >
55 > Code Listing 2.2: Rebuilding system
56 > # emerge -eav system
57 > # emerge -eav world
58 >
59 > It is safe to remove the older GCC version at this time. If you feel the
60 > need, please issue the following command (as usual, substitute
61 > =sys-devel/gcc-3.4* with the version you want to uninstall):
62 >
63 > Code Listing 2.3: Removing older GCC version
64 > # emerge -aC =sys-devel/gcc-3.4*
65 >
66 > End quote.
67 >
68 > Thus, the new gcc will actually be compiled three times, first in the
69 > initial upgrade, second as part of emerge --emptytree system (which builds
70 > the rest of the toolchain using the new gcc and builds the new gcc using
71 > itself), third as part of emerge --emptytree world, which rebuilds the
72 > entire system (including gcc) using the now fully upgraded toolchain.
73 >
74 > IOW, first time rebuilds gcc using the old version, second time rebuilds
75 > it and the toolchain using new gcc but partly old toolchain, third time
76 > rebuilds it (and everything else) with an entirely fresh toolchain.
77 >
78 > Of course, that's going to take some major time... probably 2-3 days of
79 > constant compiling. (I figure a day with my dual Opteron, with the
80 > portage work dir in a tmpfs based ramdisk in main memory... since I have 8
81 > gigs of ram I might as well use it.)
82 >
83 > OTOH, gcc 4.1.1 is a HUGE boost in performance for amd64, much more so
84 > than for x86, as amd64 is still new enough for this to be the first version
85 > to really have support for it fully integrated and optimized. (gcc 3.x had
86 > support, but it was bolted on, and optimizations weren't as good as they
87 > could have been as a result. gcc 4.0 had it integrated but as the first
88 > release of the rewrite, was mainly focused on not making things worse. gcc
89 > 4.1 finally has integrated amd64 support AND is better than 3.x in
90 > general. gcc 4.1.1 fixed a few minor remaining bugs from 4.1.0.)
91 >
92 > [1] http://www.gentoo.org/doc/en/gcc-upgrading.xml
93 >
94 > --
95 > Duncan - List replies preferred. No HTML msgs.
96 > "Every nonfree program has a lord, a master --
97 > and if you use the program, he is your master." Richard Stallman
98
99 --
100 Frank Castle is dead!
101 Call me 'The PUNISHER'!