From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19646 invoked by alias); 6 Oct 2010 08:43:39 -0000 Received: (qmail 19636 invoked by uid 22791); 6 Oct 2010 08:43:38 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,TW_FJ,TW_GC,TW_LG,TW_LR,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.multimedia-labs.de (HELO mail.multimedia-labs.de) (82.149.226.172) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Oct 2010 08:43:33 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.multimedia-labs.de (Postfix) with ESMTP id 612733148354 for ; Wed, 6 Oct 2010 10:43:31 +0200 (CEST) Received: from mail.multimedia-labs.de ([127.0.0.1]) by localhost (mail.multimedia-labs.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5uZcs73e5gw7 for ; Wed, 6 Oct 2010 10:43:25 +0200 (CEST) Received: from fox.localnet (p4FD65441.dip.t-dialin.net [79.214.84.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.multimedia-labs.de (Postfix) with ESMTPSA id 67D5931489C5 for ; Wed, 6 Oct 2010 10:43:25 +0200 (CEST) From: Andreas Frisch To: java@gcc.gnu.org Subject: gcj static crosscompiling raises issues with boehm-gc Date: Wed, 06 Oct 2010 08:43:00 -0000 User-Agent: KMail/4.5 beta1 (Linux/2.6.32-25-generic; KDE/4.5.1; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Message-Id: <20101006084325.67D5931489C5@mail.multimedia-labs.de> Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg00000.txt.bz2 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. andreas