Instalando gcc-4.6.2 en mi gentoo amd64 para añadir soporte de optimizaciones para nuevos procesadores en mi caso AMD-FX-4100 Bulldozer (family 14), flags -march=btver1 -mtune=btver1
En estos momentos el paquete
aparece boqueado por missing keyword. Desmascarar (unmask) como
sigue:
# echo "sys-devel/gcc">>
/etc/portage/package.unmask
# echo "sys-devel/gcc **>>
/etc/portage/package.keywords
De momento he enmascarado las
anteriores versiones de gcc:
# vi /etc/package.mask
>sys-devel/gcc-4.5.3-r2
=sys-devel/gcc-4.5.3-r2
=sys-devel/gcc-4.5.3-r1
=sys-devel/gcc-4.4.6-r1
=sys-devel/gcc-4.4.5
=sys-devel/gcc-4.4.4-r2
=sys-devel/gcc-4.3.3-r1
=sys-devel/gcc-4.3.6-r1
=sys-devel/gcc-4.3.4
=sys-devel/gcc-4.1.2
=sys-devel/gcc-3.4.6-r2
Hago un emerge:
# emerge -av gcc
These are the packages that would be
merged, in order:
Calculating dependencies... done!
[ebuild NS #] sys-devel/gcc-4.6.2
[4.5.3-r2] USE="cxx fortran gtk mudflap (multilib) nls nptl
openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -go
-graphite (-hardened) (-libffi) (-libssp) -multislot -nocxx -nopie
-nossp -objc -objc++ -objc-gc -test -vanilla" 0 kB
Total: 1 package (1 in new slot), Size
of downloads: 0 kB
Would you like to merge these packages?
[Yes/No]
y
# Modificar la version del compilador:
# gcc-config -l
[1] x86_64-pc-linux-gnu-4.5.3 *
[2] x86_64-pc-linux-gnu-4.6.2
# gcc-config 2
# env-update && source
/etc/profile
Reconstruir libtool:
# emerge --oneshot libtool
Solo es necesario si se actualiza desde una version anterior a 4.1:
# revdep-rebuild --library
libstdc++.so.5
# gcc-config -l
[1] x86_64-pc-linux-gnu-4.5.3
[2] x86_64-pc-linux-gnu-4.6.2 *
Agregar las flags al fichero make.conf
# vi /etc/make.conf
CFLAGS="-O2 -pipe
-fomit-frame-pointer -march=bdver1 -mtune=bdver1 -mcx16 -msahf -maes
-mpclmul -mpopcnt -mabm -mlwp -mavx"
Continuará...
Linux es genial!.