четверг, 15 января 2015 г.

Gentoo, updating GCC to newer version

If you are upgrading GCC then you do not need to do anything except switch compiler version and rebuild libtool:
root # emerge -u sys-devel/gcc
root # gcc-config -l
[1] i686-pc-linux-gnu-4.4.5 *
[2] i686-pc-linux-gnu-4.5.3

root # gcc-config 2
root # env-update && source /etc/profile
root # 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 as well:
root # revdep-rebuild --library libstdc++.so.5

Check the current version and uninstall the old version
root # gcc --version
root # emerge -C =sys-devel/gcc-4.4.5
There you go. Enjoy the new compiler!