From: Andrew Haley <aph@redhat.com>
To: java@gcc.gnu.org
Subject: Re: gcj static crosscompiling raises issues with boehm-gc
Date: Wed, 06 Oct 2010 14:25:00 -0000 [thread overview]
Message-ID: <4CAC86DE.6040909@redhat.com> (raw)
In-Reply-To: <20101006084325.67D5931489C5@mail.multimedia-labs.de>
On 10/06/2010 09:43 AM, Andreas Frisch wrote:
> hi gcj experts,
>
> i've spent some time already trying to statically cross compile a java source
> for an embedded mipsel architecture. i'm using openembedded and gcc-4.4.4 with
> the latest java part imported from master
>
> in the makefile, i am using the command
>
> $(CROSS_COMPILE)gcj $(JFLAGS) $(SOURCES) \
> -static-libgcj \
> -fjni \
> -g \
> -o dumphd-mipsel-static \
> --main=dumphd.core.DumpHD \
> -nostdlib \
> -L/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe-linux/usr/lib \
> -L/dream/projects/bluray/aacskeys-0.4.0c-mipsel/lib/linux/ \
> -Wl,-rpath-link,/dream/oe1.6/dm8000/build/tmp/staging/mipsel-oe-
> linux/usr/lib \
> -Wl,-rpath-link,/dream/projects/bluray/aacskeys-0.4.0c-
> mipsel/lib/linux/ -laacskeys \
> -shared-libgcc -Wl,-non_shared -lgcj -Wl,-call_shared -lstdc++ -
> Wl,--as-needed -lgcc_s -lpthread -lc -lm -ldl -lrt -Wl,--no-as-needed -Wl,-O1
>
> this may contain a lot of redundancies or look silly in many ways but for
> right now i just aggregated as much as possible in there from what i could find
> online.
>
> i've also set
> CLASSPATH=/dream/oe1.6/dm8000/build/tmp/cross/mipsel/bin/ecj.jar:./
>
> when i run make, linking fails:
>
> /dream/oe1.6/dm8000/build/tmp/cross/mipsel/lib/gcc/mipsel-oe-
> linux/4.4.4/../../../../mipsel-oe-linux/bin/ld: warning: cannot find entry
> symbol __start; defaulting to 00000000004084b0
> /dream/oe1.6/dm8000/build/tmp/cross/mipsel/lib/gcc/mipsel-oe-
> linux/4.4.4/../../../../mipsel-oe-linux/lib/libgcj.a(dyn_load.o): In function
> `GC_register_dynamic_libraries_dl_iterate_phdr':
> /dream/oe1.6/dm8000/build/tmp/work/mipsel-oe-linux/gcc-cross-4.4.4-
> r0.1/gcc-4.4.4/boehm-gc/dyn_load.c:454: undefined reference to `__data_start'
> /dream/oe1.6/dm8000/build/tmp/cross/mipsel/lib/gcc/mipsel-oe-
> linux/4.4.4/../../../../mipsel-oe-linux/lib/libgcj.a(os_dep.o): In function
> `GC_register_data_segments':
> /dream/oe1.6/dm8000/build/tmp/work/mipsel-oe-linux/gcc-cross-4.4.4-
> r0.1/gcc-4.4.4/boehm-gc/os_dep.c:1450: undefined reference to `__data_start'
> collect2: ld returned 1 exit status
> make: *** [dumphd-static-new] Error 1
>
> i'd be grateful for any suggestions or hints.
This looks completely broken: it seems to be trying to statically link
against libgcj. Try it without -non_shared.
Andrew.
next prev parent reply other threads:[~2010-10-06 14:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 8:43 Andreas Frisch
2010-10-06 14:25 ` Andrew Haley [this message]
2010-10-06 15:51 ` David Daney
2010-10-06 15:45 Andreas Frisch
2010-10-06 16:07 ` Andrew Haley
2010-10-06 16:53 Andreas Frisch
2010-10-06 17:07 ` David Daney
[not found] <20101006175323.A6AC03148D76@mail.multimedia-labs.de>
2010-10-06 17:58 ` David Daney
2010-10-06 18:50 Andreas Frisch
2010-10-06 19:02 ` David Daney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CAC86DE.6040909@redhat.com \
--to=aph@redhat.com \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).