Subject: Re: Cross-compiling (was: RE: New machine for Ragge (Was: Microvax 31
To: Gunnar Helliesen <gunnar@bitcon.no>
From: Boris Gjenero <bgjenero@undergrad.math.uwaterloo.ca>
List: port-vax
Date: 01/07/1998 18:38:09
Gunnar Helliesen wrote:
> 
> > PS. I tried to set up a cross-compile environment on a PPro 200
> > and it worked without too much problem. The programs I needed to play
> with
> > was as, cc, cc1, cpp, and ld to be able to compile kernels.
> 
> More details, pleeease! A HOWTO would be fantastic.
> 
> Alternatively, where could I read more about cross-compiling and how to
> set it up?
> 
> I've got a 180MHz PPRO (NetBSD/i386 1.3) I'd like to use to build VAX
> kernels.

You basically need a cross compiling gcc (gcc does this well) and some
other tools.  As noted above, you also need as and ld.  Other tools like
ar, ranlib and nm may also be required.

Last summer I set up a cross-compile environment on my P133 running
Linux.  I still have the binaries and (slightly modified NetBSD) sources
for the tools that are needed. 

The porting can be confusing.  It's not like you're porting an
application.  You actually have to figure out which header files need to
be taken from NetBSD/vax so the tool outputs the NetBSD/vax format. 
There are also some of those mundane porting things (sometimes requiring
a slight change to the code or linking with a part of the NetBSD libc). 
However, once I got the hang of it I had a very useful skill, so that
for example getting mopd-linux to read a.out was trivial.

BTW.  Nowdays I don't care too much about cross compiling.  NetBSD on a
uVAX II is stable so you just tell it to compile something and then
after some number of hours or days it is done.

-- 
|  Boris Gjenero <bgjenero@undergrad.math.uwaterloo.ca>              |
|  Home page:  http://www.undergrad.math.uwaterloo.ca/~bgjenero/     |
|  "Luke, you're going to find that many of the truths we cling to   |
|  depend greatly on our own point of view." - Obi-Wan Kenobi, ROTJ  |