This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj cross for ARM?
- From: Anthony Green <green at redhat dot com>
- To: "G. Hauer" <gilh at technolog dot ca>
- Cc: java at gcc dot gnu dot org, Michael Koch <konqueror at gmx dot de>, Richard Earnshaw <rearnsha at arm dot com>
- Date: 20 Feb 2003 12:06:19 -0800
- Subject: Re: gcj cross for ARM?
- References: <1045764275.1911.52.camel@giantclam>
On Thu, 2003-02-20 at 10:04, G. Hauer wrote:
> Has anyone been able to build a gcj cross-compiler for ARM? Any pointers
> to current documentation would be appreciated.
Here's a very high level description. If you need more details, please
ask.
There are a number of separate packages you need to be concerned with:
gcc, binutils, newlib and gdb. For gcj hackers, I suggest using the
latest development sources for gcc, but stick with the most recent
stable releases of binutils, newlib and gdb.
I usually set my build area like this...
../i <- my "prefix", where I install everything
/bgcc <- where I build gcc
/gcc <- gcc/newlib sources
/bbin <- where I build binutils
/binutils-* <- binutils sources
/bgdb <- where I build gdb
/gdb <- gdb sources
I'm sure there are cleaner ways of doing this, but this works for me.
Note that it's a good idea to merge the newlib and gcc source trees.
Some targets, like mips-elf, don't configure properly if you don't copy
the newlib/newlib and newlib/libgloss directories into gcc/newlib and
gcc/libgloss.
Start with binutils...
cd bbin
../binutils/configure --target=arm-elf --prefix=`(cd ../i; pwd)`
make all
make install
cd ..
Add the install dir to your path, so the gcc build machinery can find
arm-elf-as and arm-elf-ld....
export PATH=`(cd i; pwd)`:$PATH
Then go to gcc...
cd bgcc
../gcc/configure --target=arm-elf --prefix=`(cd ../i; pwd)`
--enable-languages=c,c++,java
make all
make install
cd ..
The, if you want to run your programs in gcc's simulator...
cd bgdb
../gdb/configure --target=arm-elf --prefix=`(cd ../i; pwd)`
make all
make install
cd ..
And you're done.
AG