Subject: Cross compiling NetBSD
To: None <gwr@mc.com>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: port-sun3
Date: 08/29/1996 09:12:08
I have built a cross compiler + ld + as to cross compile for the sun3
on my pc532 in the hope of speeding up my compilations. (I know, the
pc532 is slow too by modern standards, but it is still approx 4 times
as fast as a Sun 3/50). I had to fix a few bugs - the cross endian
support was broken in a number of places. I can feed the changes back
if there is interest.

Anyway, I have tested this by compiling the xpm library and fvwm so
the cross-build environment seems to work, including dynamic linking.

Now I would like to build a kernel and maybe other things from the
NetBSD source tree.  I have a sun3 tree with the sun3 include files,
libraries etc. My question is: Is there a preferred way to specify a
cross compiler when building?

A lot of things will build if you just do "make CC=sun3-gcc", but you
can get caught out if the build process needs to compile and run a
native executeable. Also there can be problems at the install stage
where if you are not careful your native executables get overwritten
with foreign executeables!

I seem to recall someone (Gordon?) saying they cross compiled Sun3
kernels on a sparc, so I am hoping that the build process has
been designed with support for cross compiling.

Is config documented anywhere? And I don't mean "man config, I
mean to syntax and semantics of the config files!

Ian