[fpc-pascal] why is MIPS not equivalent to MIPSEB
pascaldragon at googlemail.com
Sat Jun 15 13:39:07 CEST 2013
On 12.06.2013 11:18, Dennis wrote:
> I was trying to build a cross compiler by following the MIPS_port doc
> but since I needed MIPS bid endian version instead, I changed their
> example of MIPSel into MIPS which seems the correct way in dowloading
> binutils and specifying TARGET CPU.
> However, after many days of struggling, it appears that the correct
> spelling regarded by the crosscompiler for MIPS big endian is actually
> MIPSEB instead of MIPS!!!
> And that probably produced a lot of my earlier problems. I had to
> rename all the names of ld and as files from mips to mipseb to have the
> compiler stop complaining.
> Can someone tell me why in some areas of fpc, it is MIPS and else MIPSEB?
The compiler targets for mips are named mipsel and mipseb to avoid any
confusion regarding whether the target is now the little or big endian
one. Thus the compiler looks for mipsel-linux-* or mipseb-linux-*
binutils. But this can easily be changed by using the "-XP" compiler
argument (e.g. -XPmips-linux-) which you can also use in the fpc.cfg file.
Then there are compiler defines (those which can be checked using ifdef)
and there additionally to mipsel and mipseb also the define mips exists
so that one can check for both cpu types at once.
More information about the fpc-pascal