Subject: Re: [black-linux] Re: Cross compiler
To: NetBSD/next68k developers list <port-next68k@netbsd.org>
From: Timm Wetzel <twetzel@gwdg.de>
List: port-next68k
Date: 08/02/1999 17:47:53
On Wed, 28 Jul 1999, Lee Helpingstine wrote:

> 
> When I first tried building it, I had only about 100MB free on the swap
> drive, so I moved it to an untouched partition, and tried it again.  When
> that partition fills the slab, kernel panics and locks up,  the rom
> monitor will come up, but you have to pull the plug to shut it down.  I
> had this problem back when I first built sane on my 486 too, but I won out
> by creating a 500mb swap file, I have no clue what I'll need on my slab
> because of the amazing non-shrinking swap file. ;)

Well, I know compilers may need plenty of virtual memory, but 1GB seems a
bit unreasonable.
Perhaps your code triggers some memory leak?

Things I'd try:
- lower optimization level
- enable/disable -pipe
- enable swapfile compression (_might_ work around the symptom (out of vm
crash))
- try a recent gcc/egcs (either precompiled from peak or peanuts, or
compile yourself. The latter might require quite some additional
packages.)
- having enough memory alleviates swap problems considerably :-/

Regarding the cross compiler, the opposite way isn't too hard. (I've built
a toolchain for netbsd/next68k on NS3.3 with a bit of work.)
Cross-compiling for NS/OS is hard, however, because of the missing Mach-O
support. (The source for the GNU-based NeXT as and cc are available, of
course, but this is of little help because GNU has switched to binutils in
the meantime, which has never been done for the NeXT/Mach-O port.)

- One could try to cross-compile to .s and assemble/link on NS. 
Doubtful, because I think recent compilers tend to generate assembler
code the NeXT does not understand.

- One could try to cross-compile to aout object code and convert to Mach-O
on NS (a2m). Problem: Can a recent toolchain generate aout in version this
utility likes? (Hint: probably pre-NS2.0 aout)

- I have no idea how how recent NeXT/Apple code does the Mach-O support.
Perhaps the MOSX or Darwin cc can be configured to cross-compile to NS?

Good luck,
Timm
-- 
Timm Wetzel     	<twetzel@gwdg.de>
Biomed. NMR GmbH        Tel +49 551 201-1091    FAX +49 551 201-1307
Am Fassberg 11, D-37077 Goettingen, Germany