1 |
On Thu, Nov 27, 2008 at 1:34 AM, Duncan <1i5t5.duncan@×××.net> wrote: |
2 |
|
3 |
> It's also worth noting that due to Gentoo's gcc slotting, one can use |
4 |
> gcc-config to switch between gcc versions. Thus using a new and still |
5 |
> masked gcc isn't as much of a problem as it might be, since you can use |
6 |
> the new version for most things and switch to the old version for |
7 |
> anything that's still broken with the new version. When an |
8 |
> emerge --emptytree @system @world works just using the new version, you |
9 |
> can then unmerge the old version. |
10 |
> |
11 |
> I've done this over several gcc upgrades, now. |
12 |
> |
13 |
> It works well for C programs, but there can be issues with C++ |
14 |
> occasionally, since gcc provides libstdc++ which must remain compatible. |
15 |
> Over the versions I've done this with, it has been mostly compatible, but |
16 |
> not always 100%. At one point some stuff in KDE would break if I was |
17 |
> switched to the older gcc, since I had compiled it with the newer gcc, |
18 |
> with a mostly compatible libstdc++, but one that added a few new |
19 |
> functions. So anything that used the new functions would break when |
20 |
> switched to the old gcc and thus the old libstdc++. But most of KDE |
21 |
> would work, so I'd switch to the old version just long enough to compile |
22 |
> whatever package wouldn't yet compile with the new gcc, and wouldn't use |
23 |
> the KDE stuff that was broken (basically anything having to do with the |
24 |
> web, IDR whether it was just the web, or all Internet functionality) |
25 |
> while I did so. Then I'd switch back to the newer gcc, and everything |
26 |
> would work again. |
27 |
|
28 |
Thanks for sharing this option. I gave it a try, so far so good. |
29 |
|
30 |
martindesktop ~ # cat /etc/portage/package.keywords |
31 |
(..) |
32 |
=sys-devel/gcc-4.3.2 |
33 |
=sys-libs/glibc-2.7-r2 |
34 |
|
35 |
Next emerge gcc, output: |
36 |
|
37 |
* If you have issues with packages unable to locate libstdc++.la, |
38 |
* then try running 'fix_libtool_files.sh' on the old gcc versions. |
39 |
|
40 |
martindesktop ~ # cat /etc/make.conf |
41 |
(..) |
42 |
# gcc < 4.2.0 |
43 |
#CFLAGS="-march=nocona -O2 -pipe" |
44 |
|
45 |
# gcc >= 4.2.0 |
46 |
CFLAGS="-march=native -O2 -pipe" |
47 |
(..) |
48 |
|
49 |
Martin |