Subject: Re: i386->sgimips cross compile for R5k
To: Dmitri Nikulin <setagllib@optusnet.com.au>
From: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
List: port-sgimips
Date: 01/25/2005 10:48:41
On Sat, 22 Jan 2005 23:42:32 +1100, Dmitri Nikulin wrote:

> 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 would look to the GCC manual, Submodel options - MIPS options. They say
that "Normally, GCC will generate 64-bit code when you select a 64-bit
     architecture, but you can use `-mgp32' to get 32-bit code instead."

Bye	Pavel