|
|
1) Make sure that your current system is consistant.
2) Upgrade to at least binutils-2.15.94.0.2.2 with the ld script patch.
3) Shorten your build path e.g. PORTAGE_TMPDIR=/t (this is necessary, otherwise you will get execvp error when installing glibc.
4) You will need glibc weekly HEAD snapshot, or HEAD cvs checkout for gcc4 support.
5) If you are on nptl, make sure to add nptlony to your USE flags.
6) LEAVE YOUR LDFLAGS ALONE, also LEAVE the COMPILER VISIBILITY FLAGS ALONE.
7) Take it easy with your compiler flags, some suggestions:
Sane:-
Code:
CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -fomit-frame-pointer -pipe "
CXXFLAGS=${CFLAGS}
Less Sane:-
Code:
CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -mfpmath=sse -msse2 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -pipe "
CXXFLAGS=${CFLAGS}
7) Setup an overlay, sources for overlays:
Code:
Mafteah:
http://overlay.mafteah.co.il/
Halcy0n (gentoo dev):
http://dev.gentoo.org/~halcy0n/
I've dumped my overlay here:
http://bugs.gentoo.org/show_bug.cgi?id=90097
dirtyepic, also has an overlay, however, not sure whether he is offering it to th public.
9) Do not ditch your other compiler, as you may need it for those packages which do not yet compile with gcc4.
10) If package compiles fine but segfaults, recompile with -O1 or O0, this may help.
11) Happy compiling :-)
HTH
CAVEATS:
1) If you have a working system back it.
2) It is better to play with gcc4 in a chrooted environment, or a spare partition.
由于存在一定的风险,请用quickpkg备份binutils glibc |
|