Gentoo Archives: gentoo-doc-cvs

From: Xavier Neys <neysx@×××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: gcc-upgrading.xml
Date: Thu, 02 Feb 2006 15:59:38
Message-Id: 200602021559.k12FxURm024628@robin.gentoo.org
1 neysx 06/02/02 15:59:29
2
3 Modified: xml/htdocs/doc/en gcc-upgrading.xml
4 Log:
5 #121306 GCC Upgrade Guide enchancements
6
7 Revision Changes Path
8 1.6 +185 -24 xml/htdocs/doc/en/gcc-upgrading.xml
9
10 file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gcc-upgrading.xml?rev=1.6&content-type=text/x-cvsweb-markup&cvsroot=gentoo
11 plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gcc-upgrading.xml?rev=1.6&content-type=text/plain&cvsroot=gentoo
12 diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gcc-upgrading.xml.diff?r1=1.5&r2=1.6&cvsroot=gentoo
13
14 Index: gcc-upgrading.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v
17 retrieving revision 1.5
18 retrieving revision 1.6
19 diff -u -r1.5 -r1.6
20 --- gcc-upgrading.xml 30 Jan 2006 15:32:52 -0000 1.5
21 +++ gcc-upgrading.xml 2 Feb 2006 15:59:29 -0000 1.6
22 @@ -1,5 +1,5 @@
23 <?xml version='1.0' encoding="UTF-8"?>
24 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.5 2006/01/30 15:32:52 jkt Exp $ -->
25 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.6 2006/02/02 15:59:29 neysx Exp $ -->
26
27 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
28
29 @@ -16,7 +16,6 @@
30 <mail link="halcy0n@g.o">Mark Loeser</mail>
31 </author>
32
33 -
34 <abstract>
35 This document will guide the user through the process of upgrading GCC on their
36 Gentoo Linux machines.
37 @@ -26,8 +25,8 @@
38 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
39 <license/>
40
41 -<version>4</version>
42 -<date>2006-01-30</date>
43 +<version>5</version>
44 +<date>2006-02-02</date>
45
46 <chapter id="intro">
47 <title>Introduction</title>
48 @@ -54,11 +53,20 @@
49
50 <p>
51 This guide will document the necessary steps required to perform a seamless
52 -upgrade of the compiler used by your Gentoo box. A specific section is dedicated
53 -to the <uri link="#upgrade-3.3-to-3.4">upgrade from GCC 3.3 to the 3.4
54 -version</uri> and issues with <c>libstdc++</c>.
55 +upgrade of the compiler used by your Gentoo box. A specific section is
56 +dedicated to the <uri link="#upgrade-3.3-to-3.4">upgrade from GCC 3.3 to 3.4 or
57 +greater versions</uri> and issues with <c>libstdc++</c>. A second specific
58 +section is for users <uri link="#first-install">first installing</uri> Gentoo
59 +using a stage3 tarball, after a new GCC major/minor version has been released.
60 </p>
61
62 +<note>
63 +It should be noted that upgrading from GCC-3.4 to GCC-4.0 or greater requires
64 +no real changes to be made by the user, as GCC-3.4 and GCC-4.0 use the same
65 +ABI. All that is required is that <c>gcc-config</c> is used to select the
66 +compiler desired.
67 +</note>
68 +
69 </body>
70 </section>
71 </chapter>
72 @@ -70,8 +78,14 @@
73 <body>
74
75 <impo>
76 -If you're looking for instructions specific to upgrades from GCC-3.3 to
77 -GCC-3.4, please consult the <uri link="#upgrade-3.3-to-3.4">dedicated
78 +If you're looking for instructions specific to upgrades from GCC-3.3 to GCC-3.4
79 +or greater, please consult the <uri link="#upgrade-3.3-to-3.4">dedicated
80 +section</uri>.
81 +</impo>
82 +
83 +<impo>
84 +If you're looking for instructions specific to upgrades in GCC for new
85 +installs, please consult the <uri link="#first-install">dedicated
86 section</uri>.
87 </impo>
88
89 @@ -114,8 +128,8 @@
90 </pre>
91
92 <p>
93 -It is safe to remove older GCC version at this time. If you feel the
94 -need, please issue the following command (as usual, substitute
95 +It is safe to remove the older GCC version at this time. If you feel the need,
96 +please issue the following command (as usual, substitute
97 <c>=sys-devel/gcc-3.3*</c> with the version you want to uninstall):
98 </p>
99
100 @@ -128,15 +142,15 @@
101 </chapter>
102
103 <chapter id="upgrade-3.3-to-3.4">
104 -<title>Upgrading from GCC-3.3 to 3.4</title>
105 +<title>Upgrading from GCC-3.3 to 3.4 or greater</title>
106 <section>
107 <title>Introduction</title>
108 <body>
109
110 <p>
111 -The upgrade from GCC/3.3 to 3.4 is not so seamless as the C++ ABI changed
112 -between these two versions so there is an issue with <c>libstdc++</c> library
113 -which must be taken care of as well.
114 +The upgrade from GCC-3.3 to 3.4 or greater is not seamless as the C++ ABI
115 +changed between these two versions. There is an issue with the <c>libstdc++</c>
116 +library which must be taken care of, as well.
117 </p>
118
119 </body>
120 @@ -153,12 +167,13 @@
121 </impo>
122
123 <p>
124 -You have two possibilities on how to upgrade your system. <uri
125 -link="#upgrade-3.3-to-3.4-revdep-rebuild">First method</uri> is faster and
126 -requires use of <c>revdep-rebuild</c> tool from package <c>gentoolkit</c> while
127 -the <uri link="#upgrade-3.3-to-3.4-emerge-e">second one</uri> rebuilds the
128 +You have two possibilities on how to upgrade your system. The <uri
129 +link="#upgrade-3.3-to-3.4-revdep-rebuild">first method</uri> is faster and
130 +requires use of the <c>revdep-rebuild</c> tool from package <c>gentoolkit</c>
131 +while the <uri link="#upgrade-3.3-to-3.4-emerge-e">second one</uri> rebuilds the
132 entire system from scratch so it will make use of new GCC features. It's up to
133 -you to decide which of these two ways you will choose.
134 +you to decide which of these two ways you will choose. In most cases, the first
135 +method is sufficient.
136 </p>
137
138 </body>
139 @@ -320,10 +335,10 @@
140 </p>
141
142 <p>
143 -If a package fails during <c>emerge -e system/world</c>, you can resume
144 -operation with <c>emerge --resume</c>. If a package fails repeatedly, skip it
145 -with <c>emerge --resume --skipfirst</c>. Don't run any other instances of emerge
146 -in between or you will lose the resume information.
147 +If a package fails during <c>emerge -e system</c> or <c>emerge -e world</c>,
148 +you can resume operation with <c>emerge --resume</c>. If a package fails
149 +repeatedly, skip it with <c>emerge --resume --skipfirst</c>. Don't run any
150 +other instances of emerge in between or you will lose the resume information.
151 </p>
152
153 <p>
154 @@ -341,6 +356,152 @@
155
156 </body>
157 </section>
158 +</chapter>
159 +
160 +<chapter id="first-install">
161 +<title>Upgrading to GCC on a First Install</title>
162 +<section>
163 +<title>Introduction</title>
164 +<body>
165 +
166 +<p>
167 +A GCC upgrade on a system after installation from a stage3 tarball is a simple
168 +affair. One advantage users of new installations have is they do not have a
169 +plethora of software installed that links against the older version of GCC.
170 +The following example is for a GCC-3.3 to 3.4 or greater upgrade. Certain parts
171 +will be different if upgrading from other versions of GCC. For example, the
172 +library names used for <c>revdep-rebuild</c> below are GCC 3.3 specific, as
173 +well as the need to install <c>libstdc++-v3</c>.
174 +</p>
175 +
176 +<p>
177 +If a user has not made any customizations to their system yet, then there are
178 +very few steps to get their system upgraded to a new GCC version. As with the
179 +GCC-3.3 to 3.4 upgrade, the user has a couple options. However, unlike the
180 +GCC-3.3 to 3.4 upgrade, this one is less complicated as there are fewer
181 +differences between the methods. The <uri
182 +link="#first-install-revdep-rebuild">first method</uri> is faster and makes use
183 +of the <c>revdep-rebuild</c> tool from <c>gentoolkit</c>, similar to the above
184 +procedure. Using revdep-rebuild causes only packages which actually link
185 +against GCC libraries to be rebuilt, while the <uri
186 +link="#first-install-emerge-e">second method</uri> causes your entire new
187 +install to be recompiled with the new GCC version and takes much longer. This
188 +second method is never required and only documented for completeness.
189 +</p>
190 +
191 +<p>
192 +These first steps are common between both methods, and should be completed by
193 +everyone.
194 +</p>
195 +
196 +<pre caption="Upgrading GCC">
197 +# <i>emerge -uav gcc</i>
198 +# <i>gcc-config i686-pc-linux-gnu-3.4.4</i>
199 +# <i>source /etc/profile</i>
200 +
201 +<comment>(Rebuilding libtool)</comment>
202 +# <i>emerge --oneshot -av libtool</i>
203 +</pre>
204 +
205 +<note>
206 +This assumes that you have <c>CHOST="i686-pc-linux-gnu"</c> set. If you are
207 +using another CHOST, please use the appropriate gcc-config line.
208 +</note>
209 +
210 +<p>
211 +To provide compatibility with older binary C++ applications,
212 +<c>sys-libs/libstdc++-v3</c> needs to be merged onto your system.
213 +</p>
214 +
215 +<pre caption="Installing libstdc++-v3">
216 +# <i>emerge --oneshot sys-libs/libstdc++-v3</i>
217 +</pre>
218 +
219 +</body>
220 +</section>
221 +
222 +<section id="first-install-revdep-rebuild">
223 +<title>Using revdep-rebuild</title>
224 +<body>
225 +
226 +<p>
227 +This method requires that you first install <c>gentoolkit</c> if you have not
228 +already done so. We will then run <c>revdep-rebuild</c> to actually scan the
229 +installed packages for ones we need to rebuild, then rebuild them.
230 +</p>
231 +
232 +<pre caption="Installing gentoolkit and running revdep-rebuild">
233 +# <i>emerge -an gentoolkit</i>
234 +# <i>revdep-rebuild --library libstdc++.so.5 -- -p -v</i>
235 +# <i>revdep-rebuild --library libstdc++.so.5</i>
236 +</pre>
237 +
238 +<note>
239 +It is possible that you might have problems with non-existing package versions
240 +due to them being outdated or masked. If this is the case, you will want to use
241 +the <c>--package-names</c> option to <c>revdep-rebuild</c>. This causes packages
242 +to be recompiled based on the package name, rather than the exact name and
243 +version.
244 +</note>
245 +
246 +</body>
247 +</section>
248 +<section id="first-install-emerge-e">
249 +<title>Using emerge -e</title>
250 +<body>
251 +
252 +<p>
253 +This method, while much slower, will rebuild the system target to ensure that
254 +everything has been rebuilt with your new compiler. This is not necessary, but
255 +is valid if you are also making changes to CFLAGS or other make.conf variables
256 +that will affect the system compile.
257 +</p>
258 +
259 +<pre caption="Upgrading GCC">
260 +# <i>emerge -uav gcc</i>
261 +# <i>gcc-config i686-pc-linux-gnu-3.4.4</i>
262 +# <i>source /etc/profile</i>
263
264 +<comment>(Rebuilding libtool)</comment>
265 +# <i>emerge --oneshot -av libtool</i>
266 +</pre>
267 +
268 +<note>
269 +This assumes that you have <c>CHOST="i686-pc-linux-gnu"</c> set. If you are
270 +using another CHOST, please use the appropriate gcc-config line.
271 +</note>
272 +
273 +<p>
274 +To provide compatibility with older binary C++ applications,
275 +<c>sys-libs/libstdc++-v3</c> needs to be merged onto your system.
276 +</p>
277 +
278 +<pre caption="Installing libstdc++-v3">
279 +# <i>emerge --oneshot sys-libs/libstdc++-v3</i>
280 +</pre>
281 +
282 +<p>
283 +Since we are performing these actions after an initial installation, we do not
284 +need to recompile the world target as we would when doing an upgrade on an
285 +already installed system. However, you may choose to perform a world update in
286 +place of the system update, to ensure that all packages are updated.
287 +</p>
288 +
289 +<pre caption="Rebuilding system">
290 +# <i>emerge -e system</i>
291 +</pre>
292 +
293 +<p>
294 +It is also safe to remove older GCC versions at this time. Since this is an
295 +initial installation, we are using portage's prune feature to remove all older
296 +versions of GCC.
297 +</p>
298 +
299 +<pre caption="Cleaning up">
300 +# <i>emerge -aP sys-devel/gcc</i>
301 +</pre>
302 +
303 +</body>
304 +</section>
305 </chapter>
306 </guide>
307
308
309
310 --
311 gentoo-doc-cvs@g.o mailing list