Subject: Re: cross-compiling arm32 from i386, howto?
To: Todd Whitesel <toddpw@best.com>
From: Mark Brinicombe <mark@causality.com>
List: port-arm32
Date: 09/01/1998 02:29:56
On Mon, 31 Aug 1998, Todd Whitesel wrote:

> Is there a writeup anywhere about how one can cross-compile a source tree
> (say, -current) for arm32 from an i386 system?
> 
> So, can anyone point me to sources of info about cross-compiling for one
> NetBSD architecture from another?  I know there are people out there who
> have done similar things, and if it isn't currently easy then I am quite
> prepared to work at automating and documenting whatever I discover.
Hi,
  From something like NetBSD/i386 is not too bad for a cross compile
environment. A stock gcc 2.7.2.2 with the ARM PIC patches can be built
as a cross compiler. (Note: as standard this will not recognise the %b
format used in some NetBSD code, I just use -Wno-format to get round that 
if I cannot be bothered to patch up the compiler build).
Similary as can be built as a cross compiler from the binutils sources and
the ARM PIC patches. (Both these patch files are on ftp.netbsd.org)
The linker can be more troublesome. You need to cross build the NetBSD
linker. From i386 this is not too much of a problem, cross building from a
big endian may cause a few more problems.
Installing arm32 includes and libraries in the cross compile environment
then allows kernels and other binaries to be cross built.
The problem you will run into in building userland binaries etc is that of
the build process building intermediate binaries e.g. sh to determine host
characteristics and there is not simple solution to those problems yet.

Cheers,
				Mark