On Wed, Apr 26, 2017 at 5:32 AM, Andreas K. Huettel <dilfri...@gentoo.org> wrote: > Am Mittwoch, 26. April 2017, 02:37:17 CEST schrieb Francesco Riosa: >> 2017-04-26 0:26 GMT+02:00 Andreas K. Huettel <dilfri...@gentoo.org>: >> > Am Sonntag, 23. April 2017, 14:35:48 CEST schrieb Michał Górny: >> > > Hi, >> > > >> > > I'm thinking of masking old versions of sys-devel/gcc, in particular >> > > older than the 4.9 branch. >> > >> > Masking is fine; some time later (maybe in a few months) I'd even suggest >> > masking all of gcc-4. After all, unmasking them if you really need them is >> > rather easy. >> >> well if the intent is cleaning adding a package mask is just more burden, >> not less. >> If they compile fine with the latest stable gcc better leave them unmasked, >> right? > > Except that "switching back" from gcc-5 to gcc-4 doesn't really work, and that > gcc-4 will happily use gcc-5 libraries, with unintended consequences.
What do you mean by "gcc-4 will happily use gcc-5 libraries"? If you mean at build time, it does NOT use gcc-5 libs. If it does, that's a bug. % gcc-4.9.4 --print-search-dirs | grep ^libraries: libraries: =/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/4.9.4/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../x86_64-pc-linux-gnu/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../x86_64-pc-linux-gnu/4.9.4/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../lib64/:/lib/x86_64-pc-linux-gnu/4.9.4/:/lib/../lib64/:/usr/lib/x86_64-pc-linux-gnu/4.9.4/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/../../../:/lib/:/usr/lib/ If you mean runtime, that's controlled by /etc/ld.so.conf.d/05gcc-x86_64-pc-linux-gnu.conf. There's really nothing wrong with using a newer libstdc++ at runtime; they should be ABI compatible.