Howto emerge gcc-4.x.x on Hardened Gentoo
Dienstag, 29. September 2009Normally you only have gcc-3.4.6 on a hardened Gentoo system. (I’m using a 64bit system.)
~ # gcc-config -l
[1] x86_64-pc-linux-gnu-3.4.6 *
[2] x86_64-pc-linux-gnu-3.4.6-hardenednopie
[3] x86_64-pc-linux-gnu-3.4.6-hardenednopiessp
[4] x86_64-pc-linux-gnu-3.4.6-hardenednossp
[5] x86_64-pc-linux-gnu-3.4.6-vanilla
To emerge gcc-4.x.x you have to unmask the ebuild by adding gcc-4.x.x to /etc/portage/package.unmask. Normally it is masked by the hardened profile.
~ # echo “=sys-devel/gcc-4.3*” >> /etc/portage/package.unmask
After that just run
~ # emerge -av sys-devel/gcc
Check if it will install gcc-4.x.x in a new slot (NS) and then press enter to continue.
After emerge finished run gcc-config to see if the new gcc is installed.
~ # gcc-config -l
[1] x86_64-pc-linux-gnu-3.4.6
[2] x86_64-pc-linux-gnu-3.4.6-hardenednopie
[3] x86_64-pc-linux-gnu-3.4.6-hardenednopiessp
[4] x86_64-pc-linux-gnu-3.4.6-hardenednossp
[5] x86_64-pc-linux-gnu-3.4.6-vanilla
[6] x86_64-pc-linux-gnu-4.3.2 *
[7] x86_64-pc-linux-gnu-4.3.2-hardenednopie
[8] x86_64-pc-linux-gnu-4.3.2-vanilla
Done