[fpc-devel] Defines layout for mips

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Nov 26 14:03:59 CET 2009


Excelent. One thing I don't understand however is the link between the
defines and the makefile targets.

The Lazarus project for arm uses the -darm option to build a arm
compiler. For mipsel, how would that be?

-dmipsel ? That doesn't compile. -dmips compiles

But then I am confused, because I would expect the necessary define to
be -dmipsel and with just -dmips it's not clear that my compiler is
targeting mipsel...

Another thing is that the compiler built with -dmips in Windows always
returns an internal error. I know there are no readly available
binutils for this, but in my laboratory they only have Windows, and if
it could run I could test the compiler by inspecting the generated
assembler code, and possibly feeding it to as and ld in a mips
machine. The error seams to be the lack of the system info

Looking at i_linux.pas:

  842 {$ifdef CPUMIPS}
  843   {$ifdef linux}
  844     set_source_info(system_mipsel_linux_info);
  845   {$endif linux}
  846 {$endif CPUMIPS}

It seams that the mips system info is only added if you build the
compiler from Linux, is that correct? It's a bit confusing to me,
because I understand that the define linux is active based on the host
operating system, not the target, but if I want to cross-compile from
windows to mipsel-linux, then this define would block this
possibility?

thanks,
-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list