Creating and using GCJ ARM cross compiler

Andrew Haley aph@redhat.com
Mon Apr 21 13:11:00 GMT 2008


Andrew Haley wrote:
> Matthijs van de Water wrote:
>> I'm afraid that my "Hello World" only compiles, but does not actually
>> run on ARM(v6) hardware...
>>>> Does the error "terminate called without an active exception" mean
>> anything to one of you?
>> It means the unwinding and exception handling is broken.
>>> The program I'm trying to run is System.out.println("Hello World !")
>> compiled with arm-poky-linux-gnueabi-gcj and '-static-libgcj'.
>> I get the same error when I compile it shared (depending on libgcj.so).
>>>> root@arm:~# gdb ./hello-static
>> GNU gdb 6.8
>> Copyright (C) 2008 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
>> and "show warranty" for details.
>> This GDB was configured as "arm-poky-linux-gnueabi"...
>> (gdb) run
>> Starting program: /home/root/hello-static
>> terminate called without an active exception
>>>> Program received signal SIGABRT, Aborted.
>> 0x401cb8c4 in raise () from /lib/libc.so.6
>> (gdb) bt
>> #0 0x401cb8c4 in raise () from /lib/libc.so.6
>> #1 0x401cce0c in abort () from /lib/libc.so.6
>> Backtrace stopped: frame did not save the PC
>> (gdb)
>> I'm not sure. At this point I'd put a breakpoint on main
> and step through.
>> It is possible that, as David Daney suggested, ubuntu/gcc-4_2-branch
> isn't up to the task.
>> However, it is worth digging around some.

The other possibility is that you didn't configure right. My configure line is
/home/aph/gcc/ubuntu/gcc-4_2-branch/configure \
--target=arm-linux \
--with-sysroot=/home/aph/x-arm/chroot-arm/ \
--with-headers=/home/aph/x-arm/chroot-arm/usr/include/ \
--prefix=/home/aph/ubuntu/gcc-4_2-branch/install \
--disable-libssp \
--disable-libgomp \
--disable-libmudflap \
--enable-libgcj \
--disable-multilib \
--disable-static \
--disable-sjlj-exceptions \
--enable-languages=c,c++,java
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /