This is about
The next section gives a quick primer into GCC upgrades (and how easy they are).
If you want to read the lengthy reasoning behind GCC upgrades, please continue
with
If you are upgrading GCC then you do not need to do anything except switch compiler version and rebuild libtool:
# emerge -u gcc # gcc-config -l [1] i686-pc-linux-gnu-4.4.5 * [2] i686-pc-linux-gnu-4.5.3 # gcc-config 2 # env-update && source /etc/profile # emerge --oneshot libtool
If you upgrade GCC from a version earlier than 3.4.0 (for the 3.x series) or
4.1, you will need to run
# revdep-rebuild --library libstdc++.so.5
There you go. Enjoy the new compiler!
GCC upgrading has always been mystified, with suggestions ranging from "You do
not need to do anything" up to "You will need to rebuild your entire system
twice". Most of this FUD comes from the confusion surrounding ABI
incompatibility. But first a quick pointer towards
Earlier installments of GCC on Gentoo required you to run a specific command
called
The reason we need to rebuild libtool after the upgrade of gcc
versions is because of its main purpose:
An ABI, or
# revdep-rebuild --library libstdc++.so.5
So why is this only needed up to GCC 3.4.0/4.1 ? That's because from that
version onwards, GCC uses a forward compatible ABI, which removes the need for
rebuilding applications and libraries. Of course, guarantees can never be given
indefinitely, but when an incompatibility occurs again, we'll definitely
document it here ;-) In that case, the version of the
Some people swear that they need to rebuild every single package on their system when a new GCC version is made available. Of course, that doesn't make sense, since there are many applications that are not using GCC for their build and install process anyhow, so they would never be affected by such changes.
That however doesn't mean they are completely incorrect: newer GCC versions often include better support for the processors' instruction set, which might influence the performance of some applications in a positive way. Although it is expected that this improvement is generally only marginally, in some cases (especially CPU intensive applications) this might yield notable improvements.
There are also known cases where packages need to be built with the same
compiler. Although these packages are usually bumped by Gentoo simultaneously
(so that they are always built with the same GCC version) cherry-picking
reinstalls on these packages might prove to be troublesome. The various
During updates, you might encounter an error like the following:
cmake_bootstrap_28021_test: /usr/lib/gcc/i486-pc-linux-gnu/4.1.2/libstdc++.so.6: version `GLIBCXX_3.4.11' not found
This means that you are trying to build a package with an
The following table gives the packages that,
| Package | Rebuild needed because ... |
|---|---|