Subject: i386->sgimips cross compile for R5k
To: None <port-sgimips@netbsd.org>
From: Dmitri Nikulin <setagllib@optusnet.com.au>
List: port-sgimips
Date: 01/22/2005 23:42:32
The tools seem to get confused when I try to build a release for sgimips 
from i386 (probably others too but these are the only two archs I have 
around). The machine itself is a regular Indy which has no hardware 
faults at all, but this failure is completely independent of that.

If my CFLAGS include "-mips4 -march=r5k -mabi=n32", it will say "invalid 
bfd target" (exact message gone in the ether, but I'm trying the build 
again so should have the error ready later)

If I remove the -mabi, it will say (for every object file in crt0) that 
it's linking 32-bit code with 64-bit code. Which is silly because the 
default should be 32 bit.

I think I did a clean compile some months ago (this tree is netbsd-2, 
that might have been -2-0 or current, not sure now) but only the kernel 
worked, any binaries crashed.

And would anyone suggest more optimal flags for milking this processor's 
worth? I know L2 cache working properly would be better than any 
instruction tweak, but until then I'd like to get the most out of it. 
It's a run-of-the-mill R5000 with 256KB L2 cache, and it clocks in at 
150Mhz. NetBSD is stable on it from a stock install, but I've had all 
kinds of bad luck trying to build a user land for it.

Am I the only one with this mysterious problem? The tree builds 
perfectly for i386.

Cross-compile procedure:
./build.sh -m sgimips tools release
(since I'll be installing from these sets)

Thanks in advance,
Dmitri Nikulin