Gentoo Archives: gentoo-user

From: Peter O'Connor <vandagar@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] multiple gcc versions
Date: Sun, 25 Sep 2005 01:36:54
In Reply to: [gentoo-user] multiple gcc versions by Matthias Langer
1 Matthias Langer wrote:
2 > I'm mainly in x86 and thus using gcc-3.3.6. However, as i do some
3 > programming, i want to know if it is without greater problems possible,
4 > to install gcc-3.4.4 additionally, so that i can make sure that the code
5 > i'm writing is accepted by gcc-3.4.x too [i know that i can't expect my
6 > code to work, as it is c++ stuff and the libs i'm using are compiled
7 > with 3.3.6 - i only want to be sure that the code compiles cleanly].
8 >
9 > Thanks,
10 > Matthias Langer
12 It shouldn't be too much of a problem since they are different branches
13 of gcc and should be default install side by side. I run 3.4.4-r1 and
14 when I pretend to install 3.3.6
16 # emerge -p =gcc-3.3.6
17 [ebuild NS ] sys-devel/gcc-3.3.6
19 (from man emerge)
20 N = new, (not yet installed)
21 S = new, slot installation (side-by-side versions)
23 First of all you would need to make the 3.4.4 version available
25 echo "sys-devel/gcc ~x86" >> /etc/portage/package.keywords
27 Then try # emerge -p gcc to test how it will install the new version. If
28 it shows NS, it won't remove 3.3.6 at all. Otherwise you may want to
29 hold off installing.
31 Use gcc-config -l to check what version it is using after the install
32 and make sure it's set for 3.3.6, otherwise change it (that is assuming
33 you are still wanting 3.3.6 as default).
35 Depending on how you compile your programs you can use the gcc-3.4.4 and
36 g++-3.4.4 (ie g++-3.4.4 -o foo commands if you do it manually.
38 Or else you can use gcc-config to set 3.4.4 before compiling your code
39 to test if it compiles and then change back to 3.3.6 when you're done.
40 --
41 gentoo-user@g.o mailing list