neysx       06/02/02 15:59:29

  Modified:    xml/htdocs/doc/en gcc-upgrading.xml
  Log:
  #121306 GCC Upgrade Guide enchancements

Revision  Changes    Path
1.6       +185 -24   xml/htdocs/doc/en/gcc-upgrading.xml

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
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
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

Index: gcc-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- gcc-upgrading.xml   30 Jan 2006 15:32:52 -0000      1.5
+++ gcc-upgrading.xml   2 Feb 2006 15:59:29 -0000       1.6
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.5 
2006/01/30 15:32:52 jkt Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gcc-upgrading.xml,v 1.6 
2006/02/02 15:59:29 neysx Exp $ -->
 
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
 
@@ -16,7 +16,6 @@
   <mail link="[EMAIL PROTECTED]">Mark Loeser</mail>
 </author>
 
-
 <abstract>
 This document will guide the user through the process of upgrading GCC on their
 Gentoo Linux machines.
@@ -26,8 +25,8 @@
 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
 <license/>
 
-<version>4</version>
-<date>2006-01-30</date>
+<version>5</version>
+<date>2006-02-02</date>
 
 <chapter id="intro">
 <title>Introduction</title>
@@ -54,11 +53,20 @@
 
 <p>
 This guide will document the necessary steps required to perform a seamless
-upgrade of the compiler used by your Gentoo box. A specific section is 
dedicated
-to the <uri link="#upgrade-3.3-to-3.4">upgrade from GCC 3.3 to the 3.4
-version</uri> and issues with <c>libstdc++</c>.
+upgrade of the compiler used by your Gentoo box. A specific section is
+dedicated to the <uri link="#upgrade-3.3-to-3.4">upgrade from GCC 3.3 to 3.4 or
+greater versions</uri> and issues with <c>libstdc++</c>. A second specific
+section is for users <uri link="#first-install">first installing</uri> Gentoo
+using a stage3 tarball, after a new GCC major/minor version has been released.
 </p>
 
+<note>
+It should be noted that upgrading from GCC-3.4 to GCC-4.0 or greater requires
+no real changes to be made by the user, as GCC-3.4 and GCC-4.0 use the same
+ABI. All that is required is that <c>gcc-config</c> is used to select the
+compiler desired.
+</note>
+
 </body>
 </section>
 </chapter>
@@ -70,8 +78,14 @@
 <body>
 
 <impo>
-If you're looking for instructions specific to upgrades from GCC-3.3 to
-GCC-3.4, please consult the <uri link="#upgrade-3.3-to-3.4">dedicated
+If you're looking for instructions specific to upgrades from GCC-3.3 to GCC-3.4
+or greater, please consult the <uri link="#upgrade-3.3-to-3.4">dedicated
+section</uri>.
+</impo>
+
+<impo>
+If you're looking for instructions specific to upgrades in GCC for new
+installs, please consult the <uri link="#first-install">dedicated
 section</uri>.
 </impo>
 
@@ -114,8 +128,8 @@
 </pre>
 
 <p>
-It is safe to remove older GCC version at this time. If you feel the
-need, please issue the following command (as usual, substitute
+It is safe to remove the older GCC version at this time. If you feel the need,
+please issue the following command (as usual, substitute
 <c>=sys-devel/gcc-3.3*</c> with the version you want to uninstall):
 </p>
 
@@ -128,15 +142,15 @@
 </chapter>
 
 <chapter id="upgrade-3.3-to-3.4">
-<title>Upgrading from GCC-3.3 to 3.4</title>
+<title>Upgrading from GCC-3.3 to 3.4 or greater</title>
 <section>
 <title>Introduction</title>
 <body>
 
 <p>
-The upgrade from GCC/3.3 to 3.4 is not so seamless as the C++ ABI changed
-between these two versions so there is an issue with <c>libstdc++</c> library
-which must be taken care of as well.
+The upgrade from GCC-3.3 to 3.4 or greater is not seamless as the C++ ABI
+changed between these two versions. There is an issue with the <c>libstdc++</c>
+library which must be taken care of, as well.
 </p>
 
 </body>
@@ -153,12 +167,13 @@
 </impo>
 
 <p>
-You have two possibilities on how to upgrade your system. <uri
-link="#upgrade-3.3-to-3.4-revdep-rebuild">First method</uri> is faster and
-requires use of <c>revdep-rebuild</c> tool from package <c>gentoolkit</c> while
-the <uri link="#upgrade-3.3-to-3.4-emerge-e">second one</uri> rebuilds the
+You have two possibilities on how to upgrade your system. The <uri
+link="#upgrade-3.3-to-3.4-revdep-rebuild">first method</uri> is faster and
+requires use of the <c>revdep-rebuild</c> tool from package <c>gentoolkit</c>
+while the <uri link="#upgrade-3.3-to-3.4-emerge-e">second one</uri> rebuilds 
the
 entire system 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.
+you to decide which of these two ways you will choose. In most cases, the first
+method is sufficient.
 </p>
 
 </body>
@@ -320,10 +335,10 @@
 </p>
 
 <p>
-If a package fails during <c>emerge -e system/world</c>, you can resume
-operation with <c>emerge --resume</c>. If a package fails repeatedly, skip it
-with <c>emerge --resume --skipfirst</c>. Don't run any other instances of 
emerge
-in between or you will lose the resume information.
+If a package fails during <c>emerge -e system</c> or <c>emerge -e world</c>,
+you can resume operation with <c>emerge --resume</c>.  If a package fails
+repeatedly, skip it with <c>emerge --resume --skipfirst</c>.  Don't run any
+other instances of emerge in between or you will lose the resume information.
 </p>
 
 <p>
@@ -341,6 +356,152 @@
 
 </body>
 </section>
+</chapter>
+
+<chapter id="first-install">
+<title>Upgrading to GCC on a First Install</title>
+<section>
+<title>Introduction</title>
+<body>
+
+<p>
+A GCC upgrade on a system after installation from a stage3 tarball is a simple
+affair. One advantage users of new installations have is they do not have a
+plethora of software installed that links against the older version of GCC.
+The following example is for a GCC-3.3 to 3.4 or greater upgrade. Certain parts
+will be different if upgrading from other versions of GCC. For example, the
+library names used for <c>revdep-rebuild</c> below are GCC 3.3 specific, as
+well as the need to install <c>libstdc++-v3</c>.
+</p>
+
+<p>
+If a user has not made any customizations to their system yet, then there are
+very few steps to get their system upgraded to a new GCC version. As with the
+GCC-3.3 to 3.4 upgrade, the user has a couple options. However, unlike the
+GCC-3.3 to 3.4 upgrade, this one is less complicated as there are fewer
+differences between the methods. The <uri
+link="#first-install-revdep-rebuild">first method</uri> is faster and makes use
+of the <c>revdep-rebuild</c> tool from <c>gentoolkit</c>, similar to the above
+procedure. Using revdep-rebuild causes only packages which actually link
+against GCC libraries to be rebuilt, while the <uri
+link="#first-install-emerge-e">second method</uri> causes your entire new
+install to be recompiled with the new GCC version and takes much longer. This
+second method is never required and only documented for completeness.
+</p>
+
+<p>
+These first steps are common between both methods, and should be completed by
+everyone.
+</p>
+
+<pre caption="Upgrading GCC">
+# <i>emerge -uav gcc</i>
+# <i>gcc-config i686-pc-linux-gnu-3.4.4</i>
+# <i>source /etc/profile</i>
+
+<comment>(Rebuilding libtool)</comment>
+# <i>emerge --oneshot -av libtool</i>
+</pre>
+
+<note>
+This assumes that you have <c>CHOST="i686-pc-linux-gnu"</c> set. If you are
+using another CHOST, please use the appropriate gcc-config line.
+</note>
+
+<p>
+To provide compatibility with older binary C++ applications,
+<c>sys-libs/libstdc++-v3</c> needs to be merged onto your system.
+</p>
+
+<pre caption="Installing libstdc++-v3">
+# <i>emerge --oneshot sys-libs/libstdc++-v3</i>
+</pre>
+
+</body>
+</section>
+
+<section id="first-install-revdep-rebuild">
+<title>Using revdep-rebuild</title>
+<body>
+
+<p>
+This method requires that you first install <c>gentoolkit</c> if you have not
+already done so.  We will then run <c>revdep-rebuild</c> to actually scan the
+installed packages for ones we need to rebuild, then rebuild them.
+</p>
+
+<pre caption="Installing gentoolkit and running revdep-rebuild">
+# <i>emerge -an gentoolkit</i>
+# <i>revdep-rebuild --library libstdc++.so.5 -- -p -v</i>
+# <i>revdep-rebuild --library libstdc++.so.5</i>
+</pre>
+
+<note>
+It is possible that you might have problems with non-existing package versions
+due to them being outdated or masked. If this is the case, you will want to use
+the <c>--package-names</c> option to <c>revdep-rebuild</c>. This causes 
packages
+to be recompiled based on the package name, rather than the exact name and
+version.
+</note>
+
+</body>
+</section>
+<section id="first-install-emerge-e">
+<title>Using emerge -e</title>
+<body>
+
+<p>
+This method, while much slower, will rebuild the system target to ensure that
+everything has been rebuilt with your new compiler.  This is not necessary, but
+is valid if you are also making changes to CFLAGS or other make.conf variables
+that will affect the system compile.
+</p>
+
+<pre caption="Upgrading GCC">
+# <i>emerge -uav gcc</i>
+# <i>gcc-config i686-pc-linux-gnu-3.4.4</i>
+# <i>source /etc/profile</i>
 
+<comment>(Rebuilding libtool)</comment>
+# <i>emerge --oneshot -av libtool</i>
+</pre>
+
+<note>
+This assumes that you have <c>CHOST="i686-pc-linux-gnu"</c> set. If you are
+using another CHOST, please use the appropriate gcc-config line.
+</note>
+
+<p>
+To provide compatibility with older binary C++ applications,
+<c>sys-libs/libstdc++-v3</c> needs to be merged onto your system.
+</p>
+
+<pre caption="Installing libstdc++-v3">
+# <i>emerge --oneshot sys-libs/libstdc++-v3</i>
+</pre>
+
+<p>
+Since we are performing these actions after an initial installation, we do not
+need to recompile the world target as we would when doing an upgrade on an
+already installed system.  However, you may choose to perform a world update in
+place of the system update, to ensure that all packages are updated.
+</p>
+
+<pre caption="Rebuilding system">
+# <i>emerge -e system</i>
+</pre>
+
+<p>
+It is also safe to remove older GCC versions at this time.  Since this is an
+initial installation, we are using portage's prune feature to remove all older
+versions of GCC.
+</p>
+
+<pre caption="Cleaning up">
+# <i>emerge -aP sys-devel/gcc</i>
+</pre>
+
+</body>
+</section>
 </chapter>
 </guide>



-- 
[email protected] mailing list

Reply via email to