This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Binaries (solaris 2.6) generated with GCC-3.0 SIGSEGV
- To: gcc-help at gcc dot gnu dot org
- Subject: Binaries (solaris 2.6) generated with GCC-3.0 SIGSEGV
- From: Jorgo Bakker <jbakker at astro dot estec dot esa dot nl>
- Date: Thu, 28 Jun 2001 13:57:13 +0200
Hi,
Something goes wrong with the libstc++ creation in GCC-3.0. C++ goes
wrong, whereas Gcc seems to be fine..
Can anybody help?
Below you'll find:
* Code of simplest program
* Creation of binaries with both c++ and gcc
* Local GCC-3.0 configuration&compilation issues
* GDB output
Cheers - Jorgo
Program considered
===============
$ cat foo.cc
int main()
{
return 123;
}
Compilation & linking
===============
$ gcc -g -o foo foo.cc
$ ./foo ; echo $?
123
$ c++ -g -o foo foo.cc
$ ./foo ; echo $?
Segmentation Fault (core dumped)
139
GCC-3.0
=======
Using the Sun CC-4.2 compiler (after a failed attempt trying it with
gcc-2.95.2), I compiled GCC-3.0 on Solaris 2.6 in a *really* clean
bash-environment:
$ cd gcc-3.0-obj
$ PATH=/data/jbakker/tmp/local/bin:$PATH
$ ../gcc-3.0/configure --prefix=/data/jbakker/tmp/local \
--with-gnu-as \
--with-as=/data/jbakker/tmp/local/bin/as \
--with-gnu-ld \
--with-ld=/data/jbakker/tmp/local/bin/ld
$ make bootstrap
$ make install
Note that 'ld' and 'as' are locally compiled binutils-2.11.2, and they
seem to work properly against gcc-2.95.2.
GDB
====
Oh yeah, gdb (5.0) output:
$ gdb foo
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "sparc-sun-solaris2.6"...
(gdb) run
Starting program: /data/jbakker/tmp/foo
Program received signal SIGSEGV, Segmentation fault.
0xef747b74 in __do_global_dtors_aux ()
from /data/jbakker/tmp/local/lib/libstdc++.so.3
(gdb)