This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Exception-Catching with gcc 4.x does not work on SunOS SPARC
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Matthias Apitz <guru at unixarea dot de>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Tue, 6 Oct 2015 14:52:43 +0100
- Subject: Re: Exception-Catching with gcc 4.x does not work on SunOS SPARC
- Authentication-results: sourceware.org; auth=none
- References: <20151006122640 dot GA4316 at c720-r276659>
Not related to your issue (see Marc's email), but ...
On 6 October 2015 at 13:26, Matthias Apitz wrote:
> $ /usr/local/gcc-492/bin/gcc -v
> Using built-in specs.
> COLLECT_GCC=/usr/local/gcc-492/bin/gcc
> COLLECT_LTO_WRAPPER=/usr/local/gcc-492/libexec/gcc/sparc-sun-solaris2.10/4.9.2/lto-wrapper
> Target: sparc-sun-solaris2.10
> Configured with: ./configure --prefix=/usr/local/gcc-492 --with-gmp=/usr/local/gmp-600 --with-mpfr=/usr/local/mpfr-313 --with-mpc=/usr/local/mpc-102 --without-isl --without-cloog
Whoever built this GCC should read https://gcc.gnu.org/wiki/InstallingGCC
> Thread model: posix
> gcc version 4.9.2 (GCC)
>
> $ /usr/local/gcc-492/bin/gcc -o work work.C -L/usr/local/gcc-492/lib -lstdc++
The -L option is redundant, GCC knows how to find its own libraries,
you don't need to tell it where they are.
The -lstdc++ option is only needed because you are linking using gcc,
linking using g++ will do that automatically. See
https://gcc.gnu.org/onlinedocs/gcc/Invoking-G_002b_002b.html