This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcj vs. SIGSEGV


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]