This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcj vs. SIGSEGV
- From: Andrew Haley <aph at redhat dot com>
- To: fehrin at t-online dot de (Dr. Franz Fehringer)
- Cc: gcc at gnu dot org
- Date: Tue, 10 Feb 2004 11:04:37 +0000
- Subject: gcj vs. SIGSEGV
- References: <20040210084634.A1208@t-online.de>
Dr. Franz Fehringer writes:
> Hello,
>
> I have problems to get even simple java programs to work with gcj.
> I use gcc-3.3.2 (more details below); the problem was exactly the same with gcc-3.3.1.
> The test program is ripped out from the gettext distribution and looks like
>
> public class conftest {
> public static void main (String[] args) {
> try {
> java.util.ResourceBundle.getBundle("foobar");
> } catch (Exception e) {
> }
> System.exit(0);
> }
> }
>
> Compiling this programm with gcj -g und running under gdb-6 i get
You didn't show what commands you used to compile link and run the
program.
> The relevant environment variables are
> export CPPFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/local/include/ncurses"
> export PIC="-fPIC -DPIC"
> export FLAGS="$CPPFLAGS -pipe -O3 -fomit-frame-pointer -ffast-math -march=k6 -m3dnow -mmmx"
> export GCJFLAGS="-pipe -Wp,-D_REENTRANT -Wp,-D_GNU_SOURCE -Wp,-D_FILE_OFFSET_BITS=64 -O3 -fomit-frame-pointer -ffast-math -marchexport LDFLAGS="-O3 -L/usr/local/lib -L/usr/X11R6/lib"
This is very weird. -fomit-frame-pointer will surely break the libgcj
build.
Please try building gcc and gcj without these environment variables.
Andrew.