I'm running debian wheezy and wanted to upgrade from GCC 4.7.2 to GCC 4.9.0.
As per these instructions I installed libgmp-dev
, libmpfr-dev
and libmpc-dev
(my package manager gave me versions 2:5.0.5+dfsg-2, 3.1.0-5 and 0.9-4 respectively) and ran the following to compile gcc (note that in my case it was 4.9.0 instead of 4.6.2):
tar xzf gcc-4.6.2.tar.gz
cd gcc-4.6.2
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.6.2/configure --prefix=$HOME/gcc-4.6.2
make
make install
I now have a objdir
directory full of stuff, but where is g++, and where should I put this directory?
I'm guessing I should move it to usr/local
and add something to my PATH
variable, but I don't know what exactly, and how to make sure it is searched before my old gcc install.