Re: How to test uninstalled GCC 4.8 C and Fortran compilers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11 January 2014 01:47, David Bernier wrote:
>
> As there were problems with `make' the first time
> around with java, the second time around I only
> enabled the languages C, C++ and Fortran; that
> was done in options to the "configure" script:
>
>
> $ git checkout -b gcc-4_8-branch origin/gcc-4_8-branch
> $ cd gcc
> $ ./configure --enable-languages=c,c++,fortran
> $ make

It's recommended to do the build outside the source directory, see
http://gcc.gnu.org/wiki/InstallingGCC

The advantage is that if you mess the build up then the source
directory is untouched, so you can just remove the entire build
directory and start again in an empty directory.


> I don't want to install in the default directories
> the C and Fortran compilers for the time being.

The default installation prefix is /usr/local, so it wouldn't replace
your system compiler (which is good, because replacing the system
compiler is usually a bad idea).

> I'd like to test the GCC 4.8 C and Fortran compilers for
> now.  I suppose I could do that from the
> /home/david/local_gcc/gcc directory or a sub-directory,
> or else perhaps install GCC 4.8 in a
> non-standard directory, so as not to interfere with
> the "System" gcc, i.e.:
> gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) .
>
> I have the GCC 4.8.2 manual with me, but I've only
> used the gcc C compiler that comes with my Linux
> distribution, CentOS 6.5 .
>
> I would welcome advice on how to test the GCC 4.8
> C and Fortran compilers that were built in
> my home directory's sub-directory, i.e.
> /home/david/local_gcc/gcc .

I asume you mean do your own tests, not run the testsuite (which would
be simply "make check" in the build dir).

You can install it to a temporary directory by overriding the
installation prefix with DESTDIR e.g.

mkdir $HOME/gcc_tmp_dir
make install DESTDIR=$HOME/gcc_tmp_dir've finished testing

When you've finished testing you can just remove that directory, or
move it somewhere else.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux