How to test uninstalled GCC 4.8 C and Fortran compilers?
Brian Drummond
brian@shapes.demon.co.uk
Sat Jan 11 11:55:00 GMT 2014
On Fri, 2014-01-10 at 20:47 -0500, David Bernier wrote:
> It seems that I've successfully built gcc-4.8
> in a sub-directory of my $HOME directory,
> $ ./configure --enable-languages=c,c++,fortran
> $ make
...
> make[2]: Leaving directory
> `/home/david/local_gcc/gcc/x86_64-unknown-linux-gnu/libatomic'
> make[1]: Leaving directory `/home/david/local_gcc/gcc'
Looks like a successful make, as you say.
> I don't want to install in the default directories
> the C and Fortran compilers for the time being.
Smart move... you don't want "make install" to rm the previous compiler
then find a problem with the new one. Trust me on this...
Easiest way is to add a prefix to some alternative install location,
e.g. --prefix=/opt/experiment/gcc
to the configure command and rebuild.
Then "make install" will install to /opt/experiment/gcc instead of the
default. (You may need to create the /opt/experiment/gcc folder, and run
"make install" with permissions to write to it)
Then before you test, you add /opt/experiment/gcc/bin to $PATH, e.g.
export PATH=/opt/experiment/gcc/bin:$PATH
- Brian
More information about the Gcc-help
mailing list