[fpc-devel] Defines layout for mips

Florian Klaempfl florian at freepascal.org
Thu Nov 26 10:15:03 CET 2009


Felipe Monteiro de Carvalho schrieb:
> Hello,
> 
> I am wondering about the best way to set the mips target. We are only
> targetting mipsel (32-bits, little endian), but the Linux convention
> for the name of this target is mipsel, while mips=mipseb, so the
> command to build the target should be:
> 
> make all TARGET_OS=linux TARGET_CPU=mipsel
> 
> and in the future someone could possibly use
> 
> make all TARGET_OS=linux TARGET_CPU=mips
> 
> To target the mipseb.
> 
> But looking at the arm port, it doesn't seam to be done this way,
> there is a general arm define and other more specific for big endian
> and little endian. But maybe arm is different, because in mips eb or
> el is very important, you cannot switch the most in software, and
> mipsel is the most common.
> 
> I think that the existing defines should be changed from mips to
> mipsel, to match the Linux target namming. But I am not sure. Any
> comments?

As you might have seen, I integrated most of fpc-mips already and I
think the way to go is:
- mips (compiler target)/cpumips (host) defined for all mips cpus
- cpumipsel (host) defined for all mips little endian cpus
- cpumipseb (host) defined for all mips big endian cpus
- mips32 (compiler target)/cpumips32 (host) defined for all mips 32 bit
architectures cpus
- mips64 (compiler target)/cpumips32 (host) defined for all mips 64 bit
architectures cpus
As well as cpumips32el, cpumips32eb, cpumips64el and cpumips64eb. Within
the compiler, the eb/el decision is made based on the target_info.

The CPU targets makefile wise should be:
mips (big endian)
mipsel
mips64 (big endian)
mips64el




More information about the fpc-devel mailing list