Subject: Re: Cross compile from NetBSD/i386?
To: None <wrstuden@loki.stanford.edu>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: port-mac68k
Date: 01/14/1997 08:36:41
wrstuden@loki.stanford.edu (Bill Studenmund) writes:

  >> 
  >> Ian Dall writes:
  >> > Scott Ellis <scotte@warped.com> writes:
  >> >
  >> >   > It was suggested to try NetBSD's as and ld, but I have a feeling these
  >> >   > won't be fun to build in a cross-compile environment. ;-) 
  >> > 
  >> > It isn't *too* bad. I can give you patches for the NetBSD as and ld if you
  >> > want. The cross endian support is in there but broken.
  >> 
  >> This would be fantastic.  I don't want to reinvent the wheel if you've
  >> already figure out what's broken. ;-)

  > I'd like to get copies too. Actually, it would be great if you could
  > put the patches together, and then put them on puma (ftp.macbsd.com).

OK. It will have to wait until I get home. 

  > Since NetBSD tries hard to support non-current hardware, and x86
  > machines are cheep, I think there will be a lot of interest in getting
  > cross-compiling to work.

Yep. Also easy cross compiling reduces the remaining excuses for
not using ansi prototypes!

  > I think a goal is to eventually get it in the source. :-) This might
  > be a good first step.

It is a bit ugly and doesn't generalize. It does byte swapping but
pretty much relies on things having the same size and alignment on the
host and target machine. Doing this properly is *not* easy.  The
current FSF binutils is a much better attempt to doing cross
compilation correctly -- but then it doesn't do the dynamic libraries.

Ian