[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MIPS III support



Chris Plummer wrote:
> I know the gcc that ships with Debian 3.0 for mips supports generating 
> mips III code. You just need to pass -mips3 to it.

In recent toolchains, -mips3 is just an alias for -march=r4000.
You might prefer -march and/or -mabi.

> However, when you try 
> linking the app you get linker errors such as the following:
> 
> cobalt-03:/micro/people/cjp> cc -mips3 test.c
> /usr/bin/ld: /tmp/cc3gx9Gc.o: ISA mismatch (-mips3) with previous 
> modules (-mips1)
> Bad value: failed to merge target specific data of file /tmp/cc3gx9Gc.o
> collect2: ld returned 1 exit status

The gcc/libc startup files are MIPS I ISA only.

> It appears that you need to link against libraries that are also 
> compiled with -mips3. Do these exists, at least for the commonly used 
> ones like libc, libm, libpthreads, and libdl, and of course the various 
> crt libraries that are automatically linked in?

At least not officially in Debian. It's the same problem as for
i386/i686/Athlon optimizations.

> BTW, I also want n32 calling conventions,

You would need a recent 64bit kernel for this, as well as a very
new libc, plus some not-yet-merged patches. Nothing of this is in
Debian yet.

> which I believe is what you get by default when you 
> specify -mips3.

No, the N32 ABI is selected with -mabi=n32.


Thiemo



Reply to: