[fpc-pascal] is there a ready to use FPC Cross compiler x86-Linux -> MIPS-linux?

Sven Barth pascaldragon at googlemail.com
Sat Jun 8 17:35:47 CEST 2013

On 08.06.2013 17:31, Dennis Poon wrote:
> Sven,
> I am really ignorant in this area. I followed the doc to download the
> <since I actually needed mips instead of mipsel, I choose the following
> deb file>
> binutils-mips-linux-gnu_2.22-8_i386.deb and i Installed it after
> installing fpc....deb
> by dpkg -i binutils-mips-linux-gnu_2.22-8_i386.deb
> and I believe that installed files in /usr
> as I found /usr/mips-linux-gnu/bin folder contains the following files:
> ar
> as
> ld
> nm
> objcopy
> objdump
> ranlib
> strip

Ok, then add the following option: "BINUTILSPREFIX=" (there is no value 
after the "=", but ensure that there is a space to the next option if 
there is any)

> Also, although I followed the doc and add the lines
> deb http://www.emdebian.org/debian/ squeeze main
> I don't know how that actually does anything. No crosstools files see to
> be generated when I install fpc...deb

I'm no Debian user, so I can't help you with this specific part.

> What shuold I do now? Also, if it succeeds finally, how should I make
> the new target CPU available in Lazarus?

You'll need to change Lazarus' compiler to the newly compiled trunk 
compiler. If you also built the normal linux one using "make all install 
..." you can point Lazarus to the directory which you passed in 
INSTALL_PREFIX (in the example C:\fpc\2.7.1) and add the remaining path 
to the fpc binary (on Windows "bin\i386-win32" on Linux just "bin"). 
Then you should be able to successfully set "Target CPU" in the compiler 
settings to Mips and confirm with OK.


> Dennis
>> On 08.06.2013 13:43, Dennis Poon wrote:
>>> Sven,
>>> Thanks for the prompt reply.
>>> I did "make all ...." and after many lines of messages, the last few
>>> are:
>>> make[5]: mipsel-linux-as: command not found
>>> make[5]: *** [prt0.o] Error 127
>>> make[5]: Leavning directory '/home/dennis/fpc/rtl/linux'
>>> ....
>>> make[1]:
>>> make: *** [build-stamp.mipsel-linus] Error 2
>>> Any clues?
>> How are the binutils called that you generated? If they are called
>> e.g. "mips-linux-as" and "mips-linux-ld" then you need to pass the
>> additional option "BINUTILSPREFIX=mips-linux-" to the "make all" call.
>> Regards,
>> Sven
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 2013.0.3343 / Virus Database: 3199/6394 - Release Date: 06/08/13
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

More information about the fpc-pascal mailing list