Subject: Cross compiling from Linux
To: None <port-vax@NetBSD.ORG>
From: Boris Gjenero <bgjenero@undergrad.math.uwaterloo.ca>
List: port-vax
Date: 05/03/1997 01:56:39
I'm now quite convinced that the problems I've been experiencing with my
kernel compiles are due to memory. My best attempt to get it to compile
so far has been switching to single user mode and execing gcc from the
command line. However, that is not enough. It got me through
nfs_serv.c but I can't get past nfs_vnops.c. I'm not really worried
because I'll be upgrading the memory in my uVAX soon, but anyways I
tried to set up a cross compiler from x86 linux. Here's what happened:
I first saw that the normal make was hopeless for BSD Makefiles so I got
and compiled the make from NetBSD-current on Linux. I used
Makefile.boot and I had to kill two functions (I think vsnprintf and
snprintf) from make that were implemented in the Linux standard
libraries.
Then I tried to compile other stuff. Only gcc supports vax-dec-netbsd,
so I had to try and use the sources from NetBSD-current for other stuff.
"as" was trivial to compile, and it worked perfectly. However, ld was
an incredible pain and I still don't have it right. First of all, there
are a couple of functions not in Linux libc, but that's simple to
solve--I just take them from NetBSD libc. The **BIG** problem is that
ld seems to want some of the host include files and some of the target
include files. I thought I had that sorted out, and ld compiled, but
whatever it outputs is nowhere near correct. I don't know where the
problems lie now... they're probably in some include files included by
the Linux include file. I even tried the i386-netbsd build of bintools,
and it couldn't understand the NetBSD/VAX formats (it only understood
the generic format). Does anybody have a clue as to what to do with ld?
My last test was manually running the cross-compiling gcc I just built
on some kernel sources. The resulting object files were identical to
those from the VAX.
BTW. Note that with what I have done so far I can compile those big
files on my Linux box and I should be able to compile a kernel.
--
| 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 |