Hi, docs at $URL says that gcc-3.4.4 won't be used as a default system compiler. However, after running `emerge -uav gcc` on my x86 system (plus a few packages from ~x86) it has switched to the newly installed version. >>> /usr/bin/g++-3.4.4 -> /usr/i686-pc-linux-gnu/gcc-bin/3.4.4/i686-pc-linux-gnu-g++ >>> /usr/i686-pc-linux-gnu/gcc-bin/3.4.4/gcc -> i686-pc-linux-gnu-gcc >>> /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6 -> libstdc++.so.6.0.3 * Switching native-compiler to i686-pc-linux-gnu-3.4.4 ... [ ok ] * If you intend to use the gcc from the new profile in an already * running shell, please remember to do: * # source /etc/profile * If you have issues with packages unable to locate libstdc++.la, * then try running 'fix_libtool_files.sh' on the old gcc versions. * You should make sure to rebuild all your C++ packages when * upgrading between different versions of gcc. For example, * when moving to gcc-3.4 from gcc-3.3, emerge gentoolkit and run: * # revdep-rebuild --library libstdc++.so.5 * For more information on the steps to take when upgrading * from gcc-3.3 please refer to: * http://www.gentoo.org/proj/en/base/x86/gcc-upgrading-guide.xml >>> Regenerating /etc/ld.so.cache... >>> sys-devel/gcc-3.4.4-r1 merged. >>> clean: No packages selected for removal. >>> Auto-cleaning packages ... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. slon ~ # gcc-config -l [1] i686-pc-linux-gnu-3.3.6 [2] i686-pc-linux-gnu-3.3.6-hardened [3] i686-pc-linux-gnu-3.3.6-hardenednopie [4] i686-pc-linux-gnu-3.3.6-hardenednopiessp [5] i686-pc-linux-gnu-3.3.6-hardenednossp [6] i686-pc-linux-gnu-3.4.4 * [7] i686-pc-linux-gnu-3.4.4-hardened [8] i686-pc-linux-gnu-3.4.4-hardenednopie [9] i686-pc-linux-gnu-3.4.4-hardenednopiessp [10] i686-pc-linux-gnu-3.4.4-hardenednossp slon ~ # emerge --info Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r3 i686) ================================================================= System uname: 2.6.14-gentoo-r3 i686 AMD Athlon(tm) processor Gentoo Base System version 1.6.13 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-tbird -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-tbird -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.suchdol.czf/ http://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo ftp://ftp.linux.cz/pub/linux/gentoo" LINGUAS="cs en" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X a52 aac aalib alsa apache apm arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdparanoia cdr crypt cups curl dga dv dvd dvdread emboss encode ethereal exif expat fam flac foomaticdb gd gdbm gif glut gphoto2 gstreamer gtk gtk2 hal idn imagemagick imap imlib ipv6 irda irmc jabber java jpeg junit kde kdeenablefinal kdepim lcms ldap libg++ libwww logrotate mad matrox mikmod mmx mmxext mng motif mozsvg mp3 mpeg ncurses nls nodrm nptl ogg oggvorbis openal openexr opengl pam pcre pdflib perl png python qt quicktime readline real recode ruby samba sasl sdl slang sms speex spell ssl subversion tcltk tcpd tga theora tiff truetype truetype-fonts type1-fonts udev unicode usb visualization vorbis win32codecs wmf xanim xine xml2 xmms xv xvid xvmc zlib linguas_cs linguas_en userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, MAKEOPTS slon ~ # emerge -pv gcc These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] sys-devel/gcc-3.4.4-r1 (-altivec) -bootstrap -boundschecking -build -fortran -gcj +gtk -hardened -ip28 -mudflap (-multilib) -multislot (-n32) (-n64) +nls -nocxx -nopie -nossp -objc -objc-gc -vanilla 0 kB
Same thing happened here.
Happened here also
Hmm, it seems that this issue affects the `emerge -e system` part of our guide. After installing "new" gcc version the toolchain eclass switches to the newly installed compiler (where "new" could mean older version as well - if you have 3.4.4-r1 installed and re-emerge 3.3.6 afterwards, it would switch as well). I've verified this by `quickpkg =gcc-3.3.6` followed by `emerge -avK =gcc-3.3.6`. It said it switched to the 3.3.6 and `gcc-config` displayed the same. I'm not sure if it would affect stuff in one emerge pass, though - would portage use the newly-switched-to evrsion of the compiler? And I'm not affected by some orphaned /etc/env.d/gcc/config*: slon ~ # l /etc/env.d/gcc/ total 52K drwxr-xr-x 2 root root 4.0K Dec 3 12:09 . drwxr-xr-x 5 root root 4.0K Dec 3 14:07 .. -rw-r--r-- 1 root root 32 Dec 3 14:50 config -rw-r--r-- 1 root root 296 Dec 3 14:49 i686-pc-linux-gnu-3.3.6 -rw-r--r-- 1 root root 364 Dec 3 14:49 i686-pc-linux-gnu-3.3.6-hardened -rw-r--r-- 1 root root 369 Dec 3 14:49 i686-pc-linux-gnu-3.3.6-hardenednopie -rw-r--r-- 1 root root 372 Dec 3 14:49 i686-pc-linux-gnu-3.3.6-hardenednopiessp -rw-r--r-- 1 root root 369 Dec 3 14:49 i686-pc-linux-gnu-3.3.6-hardenednossp -rw-r--r-- 1 root root 292 Dec 3 12:09 i686-pc-linux-gnu-3.4.4 -rw-r--r-- 1 root root 356 Dec 3 12:09 i686-pc-linux-gnu-3.4.4-hardened -rw-r--r-- 1 root root 361 Dec 3 12:09 i686-pc-linux-gnu-3.4.4-hardenednopie -rw-r--r-- 1 root root 364 Dec 3 12:09 i686-pc-linux-gnu-3.4.4-hardenednopiessp -rw-r--r-- 1 root root 361 Dec 3 12:09 i686-pc-linux-gnu-3.4.4-hardenednossp So, I think that moving `emerge -1 libstdc++v3` *before* `emerge -e system` would fix that.
Somebody should update the doc then.
Created attachment 73984 [details, diff] gcc-upgrading-guide.xml.patch What about this?
(In reply to comment #5) > What about this? In CVS. However, the announcements still say that the compiler won't be switched automagically, and that is not true :-(. Another note - solar suggested adding "older" to the "To provide compatibility with binary C++ applications ...".
This makes no sense that it updates to it. I'm almost positive it did not do so on my machines. Could someone look over the logic in should_we_gcc_config() in toolchain.eclass? It should not be upgrading to the new compiler since that could introduce some interesting results.
fixed in cvs