This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: cross compiling libgcj for powerpc-linux?
- To: Mathias Kiss <mathias_kiss at hotmail dot com>
- Subject: Re: cross compiling libgcj for powerpc-linux?
- From: Jeff Sturm <jeff dot sturm at appnet dot com>
- Date: Wed, 08 Nov 2000 10:22:15 -0500
- CC: java-discuss at sources dot redhat dot com
- Organization: Commerce One
- References: <F315CTaogxLDp7mvjkO00001504@hotmail.com>
- Reply-To: jeff dot sturm at commerceone dot com
Mathias Kiss wrote:
> But we didn't succeed in building the libgcj-2.95.1 using our cross-compiler
> for powerpc. Our questions are now:
I don't think libgcj can be cross-compiled without modifications. The last time
I attempted it failed while configuring libffi.
Currently libffi/configure.in uses AC_CHECK_SIZEOF, which requires a native
test. If you hack configure.in, pasting in the correct values for your target,
the rest might work.
> -Which options are needed (--target=... / --host=.. )?
You need to specify at least --target for cross compilation. See the online
docs for more info:
http://gcc.gnu.org/onlinedocs/gcc_3.html#SEC56
> - Should we run 'make all' or 'make bootstrap'? What does 'make bootstrap'
> do?
'make bootstrap' tests the compiler by rebuilding with itself. (You cannot
bootstrap a cross compiler.)
> powerpc-8xx-linux-gcc -DLINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1
> -DNO_SIGNALS=1
> -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1 -I.
> -I/cross/src/libgcj-2.95.1/boehm-gc
> -I././targ-include -I/cross/src/libgcj-2.95.1/boehm-gc/./libc/include
> -fno-built
> in -g -O2 -c /cross/src/libgcj-2.95.1/boehm-gc/allchblk.c -o allchblk.o
> In file included from /cross/src/libgcj-2.95.1/boehm-gc/allchblk.c:20:
> /cross/src/libgcj-2.95.1/boehm-gc/gc_priv.h:469: parse error before `--'
> make[1]: *** [allchblk.lo] Error 1
> make[1]: Leaving directory
> `/cross/powerpc/libgcj/powerpc-8xx-linux/boehm-gc'
> make: *** [all-target-boehm-gc] Error 2
You'll have to look at gc_priv.h for more clues. (Chances are there is an
informative message on line 469, the `--' token is a common technique to force
an error.)
I don't have libgcj-2.95.1 on disk anymore, but IIRC the old boehm-gc did not
have a test_and_set for PPC Linux. If that is the error, you can either build
without threads or get a newer gcj/libgcj.
--
Jeff Sturm
jeff.sturm@commerceone.com