/[gentoo]/xml/htdocs/doc/en/gcc-upgrading.xml
Gentoo

Diff of /xml/htdocs/doc/en/gcc-upgrading.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.26
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.15 2006/09/02 04:16:58 vapier Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.26 2007/04/02 23:13:45 jkt Exp $ -->
3 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 5
6<guide link="/doc/en/gcc-upgrading.xml"> 6<guide link="/doc/en/gcc-upgrading.xml">
7<title>Gentoo Linux GCC Upgrade Guide</title> 7<title>Gentoo GCC Upgrade Guide</title>
8 8
9<author title="Author"> 9<author title="Author">
10 <mail link="amne@gentoo.org">Wernfried Haas</mail> 10 <mail link="amne@gentoo.org">Wernfried Haas</mail>
11</author> 11</author>
12<author title="Author"> 12<author title="Author">
13 <mail link="jkt@gentoo.org">Jan Kundrát</mail> 13 <mail link="jkt@gentoo.org">Jan Kundrát</mail>
14</author> 14</author>
15<author title="Editor"> 15<author title="Editor">
16 <mail link="halcy0n@gentoo.org">Mark Loeser</mail> 16 <mail link="mark@halcy0n.com">Mark Loeser</mail>
17</author> 17</author>
18 18
19<abstract> 19<abstract>
20This document will guide the user through the process of upgrading GCC on their 20This document will guide the user through the process of upgrading GCC on their
21Gentoo Linux machines. 21Gentoo machines.
22</abstract> 22</abstract>
23 23
24<!-- The content of this document is licensed under the CC-BY-SA license --> 24<!-- The content of this document is licensed under the CC-BY-SA license -->
25<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 25<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
26<license/> 26<license/>
27 27
28<version>13</version> 28<version>22</version>
29<date>2006-08-30</date> 29<date>2007-04-03</date>
30 30
31<chapter id="intro"> 31<chapter id="intro">
32<title>Introduction</title> 32<title>Introduction</title>
33<section> 33<section>
34<title>GCC Upgrading</title> 34<title>GCC Upgrading</title>
54</p> 54</p>
55 55
56<p> 56<p>
57This guide will document the necessary steps required to perform a seamless 57This guide will document the necessary steps required to perform a seamless
58upgrade of the compiler used by your Gentoo box. A specific section is 58upgrade of the compiler used by your Gentoo box. A specific section is
59dedicated to the <uri link="#upgrade-3.3-to-3.4">upgrade from GCC 3.3 to 3.4 or 59dedicated to the <uri link="#upgrade-3.3-to-3.4">upgrade from GCC 3.3 to 3.4</uri>
60greater versions</uri> and issues with <c>libstdc++</c>. A second specific 60and issues with <c>libstdc++</c>. A second specific
61section is for users <uri link="#first-install">first installing</uri> Gentoo 61section is for users <uri link="#first-install">first installing</uri> Gentoo
62using a stage3 tarball, after a new GCC major/minor version has been released. 62using a stage3 tarball, after a new GCC major/minor version has been released.
63</p> 63</p>
64 64
65<warn> 65<warn>
66It should be noted that upgrading from GCC-3.4 to GCC-4.1 or greater still 66It should be noted that upgrading from GCC-3.4 (or 3.3) to GCC-4.1 or greater
67requires you to follow the general upgrading instructions, as GCC-3.4 and 67still requires you to follow the <uri link="#upgrade-general">general upgrading
68GCC-4.1 use slightly different ABIs. 68instructions</uri>, as GCC-3.4 and GCC-4.1 use slightly different ABIs.
69</warn> 69</warn>
70 70
71</body> 71</body>
72</section> 72</section>
73</chapter> 73</chapter>
77<section> 77<section>
78<title>Introduction</title> 78<title>Introduction</title>
79<body> 79<body>
80 80
81<impo> 81<impo>
82If you're looking for instructions specific to upgrades from GCC-3.3 to GCC-3.4 82If you're looking for instructions specific to upgrades from GCC-3.3 to GCC-3.4,
83or greater, please consult the <uri link="#upgrade-3.3-to-3.4">dedicated 83please consult the <uri link="#upgrade-3.3-to-3.4">dedicated
84section</uri>. 84section</uri>.
85</impo> 85</impo>
86 86
87<impo> 87<impo>
88If you're looking for instructions specific to upgrades in GCC for new 88If you're looking for instructions specific to upgrades in GCC for new
110# <i>emerge -uav gcc</i> 110# <i>emerge -uav gcc</i>
111 111
112<comment>(Please substitute "i686-pc-linux-gnu-4.1.1" with the GCC 112<comment>(Please substitute "i686-pc-linux-gnu-4.1.1" with the GCC
113version and CHOST settings you've upgraded to:)</comment> 113version and CHOST settings you've upgraded to:)</comment>
114# <i>gcc-config i686-pc-linux-gnu-4.1.1</i> 114# <i>gcc-config i686-pc-linux-gnu-4.1.1</i>
115# <i>source /etc/profile</i> 115# <i>env-update &amp;&amp; source /etc/profile</i>
116 116
117<comment>If you upgraded from gcc 3 to 4 (e.g. from 3.4.6 to 4.1.1 in this 117<comment>If you upgraded from gcc 3 to 4 (e.g. from 3.4.6 to 4.1.1 in this
118example) you will have to run fix_libtool_files.sh manually</comment> 118example) you will have to run fix_libtool_files.sh manually</comment>
119# <i>fix_libtool_files.sh 3.4.6</i> 119# <i>fix_libtool_files.sh 3.4.6</i>
120 120
140 140
141<pre caption="Removing older GCC version"> 141<pre caption="Removing older GCC version">
142# <i>emerge -aC =sys-devel/gcc-3.4*</i> 142# <i>emerge -aC =sys-devel/gcc-3.4*</i>
143</pre> 143</pre>
144 144
145<impo>
146Please note that the GCC 4.1 and newer can compile only kernels newer than
1472.4.34. Don't remove your old GCC version if you want to use an older kernel.
148</impo>
149
150<impo> <!-- FIXME: do we really want to keep it here? -->
151In case you're upgrading from GCC-3.3, you should run <c>emerge --oneshot
152sys-libs/libstdc++-v3</c> to provide compatibility with older binary C++
153applications.
154</impo>
155
145</body> 156</body>
146</section> 157</section>
147</chapter> 158</chapter>
148 159
149<chapter id="upgrade-3.3-to-3.4"> 160<chapter id="upgrade-3.3-to-3.4">
150<title>Upgrading from GCC-3.3 to 3.4 or greater</title> 161<title>Upgrading from GCC-3.3 to 3.4</title>
151<section> 162<section>
152<title>Introduction</title> 163<title>Introduction</title>
153<body> 164<body>
154 165
155<p> 166<p>
156The upgrade from GCC-3.3 to 3.4 or greater is not seamless as the C++ ABI 167The upgrade from GCC-3.3 to 3.4 is not seamless as the C++ ABI
157changed between these two versions. There is an issue with the <c>libstdc++</c> 168changed between these two versions. There is an issue with the <c>libstdc++</c>
158library which must be taken care of, as well. 169library which must be taken care of, as well.
159</p> 170</p>
160 171
161</body> 172</body>
163<section id="upgrade-3.3-to-3.4-choices"> 174<section id="upgrade-3.3-to-3.4-choices">
164<title>The Choices</title> 175<title>The Choices</title>
165<body> 176<body>
166 177
167<impo> 178<impo>
168If you upgrade from gcc 3.4 to 4.1, please consult the General Update 179If you upgrade from gcc 3.4 to 4.1, please consult the <uri
169instructions. 180link="#upgrade-general">General Update instructions</uri>.
170</impo> 181</impo>
171 182
172<impo> 183<impo>
173If you're upgrading on a SPARC machine, you will have to take the way of 184If you're upgrading on a SPARC machine, you will have to take the way of
174<uri link="#upgrade-3.3-to-3.4-emerge-e">complete system rebuild</uri> due to 185<uri link="#upgrade-3.3-to-3.4-emerge-e">complete system rebuild</uri> due to
180If you upgrade from gcc 3.3 to 3.4, you have two possibilities on how to 191If you upgrade from gcc 3.3 to 3.4, you have two possibilities on how to
181upgrade your system. The <uri link="#upgrade-3.3-to-3.4-revdep-rebuild">first 192upgrade your system. The <uri link="#upgrade-3.3-to-3.4-revdep-rebuild">first
182method</uri> is faster and requires use of the <c>revdep-rebuild</c> tool from 193method</uri> is faster and requires use of the <c>revdep-rebuild</c> tool from
183package <c>gentoolkit</c> while the <uri 194package <c>gentoolkit</c> while the <uri
184link="#upgrade-3.3-to-3.4-emerge-e">second one</uri> rebuilds the entire 195link="#upgrade-3.3-to-3.4-emerge-e">second one</uri> rebuilds the entire
185system from scratch so it will make use of new GCC features. It's up to you to decide which of these two ways you will choose. In most cases, the first 196system from scratch so it will make use of new GCC features. It's up to you to
197decide which of these two ways you will choose. In most cases, the first
186method is sufficient.</p> 198method is sufficient.
199</p>
200
201<p>
187<p>If you upgrade from gcc 3.3 to 4.1, do not use the method based on 202If you upgrade from gcc 3.3 to 4.1, do not use the method based on
188revdep-rebuild, but do a <uri link="#upgrade-3.3-to-3.4-emerge-e">complete 203revdep-rebuild, but do a <uri link="#upgrade-3.3-to-3.4-emerge-e">complete
189system rebuild</uri>. 204system rebuild</uri>.
190</p> 205</p>
191 206
192</body> 207</body>
314 329
315<p> 330<p>
316A GCC upgrade on a system after installation from a stage3 tarball is a simple 331A GCC upgrade on a system after installation from a stage3 tarball is a simple
317affair. One advantage users of new installations have is they do not have a 332affair. One advantage users of new installations have is they do not have a
318plethora of software installed that links against the older version of GCC. 333plethora of software installed that links against the older version of GCC.
319The following example is for a GCC-3.3 to 3.4 or greater upgrade. Certain parts 334The following example is for a GCC-3.3 to 3.4 upgrade. Certain parts
320will be different if upgrading from other versions of GCC. For example, the 335will be different if upgrading from other versions of GCC. For example, the
321library names used for <c>revdep-rebuild</c> below are GCC 3.3 specific, as 336library names used for <c>revdep-rebuild</c> below are GCC 3.3 specific, as
322well as the need to install <c>libstdc++-v3</c>. 337well as the need to install <c>libstdc++-v3</c>.
323</p> 338</p>
324 339

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20