From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1F4gry-0001Hs-4x for garchives@archives.gentoo.org; Thu, 02 Feb 2006 15:59:38 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id k12FxVHs026280; Thu, 2 Feb 2006 15:59:31 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [134.68.220.30]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id k12FxURm024628 for ; Thu, 2 Feb 2006 15:59:30 GMT Message-Id: <200602021559.k12FxURm024628@robin.gentoo.org> Received: from lark.gentoo.osuosl.org ([140.211.166.177] helo=lark) by smtp.gentoo.org with smtp (Exim 4.54) id 1F4grp-00083d-KS for gentoo-doc-cvs@lists.gentoo.org; Thu, 02 Feb 2006 15:59:29 +0000 Received: by lark (sSMTP sendmail emulation); Thu, 2 Feb 2006 15:59:29 +0000 From: "Xavier Neys" Date: Thu, 2 Feb 2006 15:59:29 +0000 To: gentoo-doc-cvs@lists.gentoo.org Subject: [gentoo-doc-cvs] cvs commit: gcc-upgrading.xml Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-doc-cvs@gentoo.org Reply-to: docs-team@lists.gentoo.org X-Archives-Salt: 108606bc-7670-4ab5-8103-38951611e47c X-Archives-Hash: 2f7dc83d18ae93ac7f5e22e8d919b5cc 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 @@ - + @@ -16,7 +16,6 @@ Mark Loeser - This document will guide the user through the process of upgrading GCC on their Gentoo Linux machines. @@ -26,8 +25,8 @@ -4 -2006-01-30 +5 +2006-02-02 Introduction @@ -54,11 +53,20 @@

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 upgrade from GCC 3.3 to the 3.4 -version and issues with libstdc++. +upgrade of the compiler used by your Gentoo box. A specific section is +dedicated to the upgrade from GCC 3.3 to 3.4 or +greater versions and issues with libstdc++. A second specific +section is for users first installing Gentoo +using a stage3 tarball, after a new GCC major/minor version has been released.

+ +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 gcc-config is used to select the +compiler desired. + +
@@ -70,8 +78,14 @@ -If you're looking for instructions specific to upgrades from GCC-3.3 to -GCC-3.4, please consult the dedicated +If you're looking for instructions specific to upgrades from GCC-3.3 to GCC-3.4 +or greater, please consult the dedicated +section. + + + +If you're looking for instructions specific to upgrades in GCC for new +installs, please consult the dedicated section. @@ -114,8 +128,8 @@

-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 =sys-devel/gcc-3.3* with the version you want to uninstall):

@@ -128,15 +142,15 @@ -Upgrading from GCC-3.3 to 3.4 +Upgrading from GCC-3.3 to 3.4 or greater
Introduction

-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 libstdc++ 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 libstdc++ +library which must be taken care of, as well.

@@ -153,12 +167,13 @@

-You have two possibilities on how to upgrade your system. First method is faster and -requires use of revdep-rebuild tool from package gentoolkit while -the second one rebuilds the +You have two possibilities on how to upgrade your system. The first method is faster and +requires use of the revdep-rebuild tool from package gentoolkit +while the second one 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.

@@ -320,10 +335,10 @@

-If a package fails during emerge -e system/world, you can resume -operation with emerge --resume. If a package fails repeatedly, skip it -with emerge --resume --skipfirst. Don't run any other instances of emerge -in between or you will lose the resume information. +If a package fails during emerge -e system or emerge -e world, +you can resume operation with emerge --resume. If a package fails +repeatedly, skip it with emerge --resume --skipfirst. Don't run any +other instances of emerge in between or you will lose the resume information.

@@ -341,6 +356,152 @@

+
+ + +Upgrading to GCC on a First Install +
+Introduction + + +

+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 revdep-rebuild below are GCC 3.3 specific, as +well as the need to install libstdc++-v3. +

+ +

+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 first method is faster and makes use +of the revdep-rebuild tool from gentoolkit, similar to the above +procedure. Using revdep-rebuild causes only packages which actually link +against GCC libraries to be rebuilt, while the second method 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. +

+ +

+These first steps are common between both methods, and should be completed by +everyone. +

+ +
+# emerge -uav gcc
+# gcc-config i686-pc-linux-gnu-3.4.4
+# source /etc/profile
+
+(Rebuilding libtool)
+# emerge --oneshot -av libtool
+
+ + +This assumes that you have CHOST="i686-pc-linux-gnu" set. If you are +using another CHOST, please use the appropriate gcc-config line. + + +

+To provide compatibility with older binary C++ applications, +sys-libs/libstdc++-v3 needs to be merged onto your system. +

+ +
+# emerge --oneshot sys-libs/libstdc++-v3
+
+ + +
+ +
+Using revdep-rebuild + + +

+This method requires that you first install gentoolkit if you have not +already done so. We will then run revdep-rebuild to actually scan the +installed packages for ones we need to rebuild, then rebuild them. +

+ +
+# emerge -an gentoolkit
+# revdep-rebuild --library libstdc++.so.5 -- -p -v
+# revdep-rebuild --library libstdc++.so.5
+
+ + +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 --package-names option to revdep-rebuild. This causes packages +to be recompiled based on the package name, rather than the exact name and +version. + + + +
+
+Using emerge -e + + +

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

+ +
+# emerge -uav gcc
+# gcc-config i686-pc-linux-gnu-3.4.4
+# source /etc/profile
 
+(Rebuilding libtool)
+# emerge --oneshot -av libtool
+
+ + +This assumes that you have CHOST="i686-pc-linux-gnu" set. If you are +using another CHOST, please use the appropriate gcc-config line. + + +

+To provide compatibility with older binary C++ applications, +sys-libs/libstdc++-v3 needs to be merged onto your system. +

+ +
+# emerge --oneshot sys-libs/libstdc++-v3
+
+ +

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

+ +
+# emerge -e system
+
+ +

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

+ +
+# emerge -aP sys-devel/gcc
+
+ + +
-- gentoo-doc-cvs@gentoo.org mailing list