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

Michael Ring mail at michael-ring.org
Wed Jun 12 12:08:39 CEST 2013

The other Michael answering now ;-)

Just for fun I downloaded the deb-file you described below, the deb 
package seems to include the correctly named  binaries at correct places:

x ./usr/bin/
x ./usr/bin/mipsel-linux-gnu-addr2line
x ./usr/bin/mipsel-linux-gnu-c++filt
x ./usr/bin/mipsel-linux-gnu-ld.bfd
x ./usr/bin/mipsel-linux-gnu-gprof
x ./usr/bin/mipsel-linux-gnu-strip
x ./usr/bin/mipsel-linux-gnu-size
x ./usr/bin/mipsel-linux-gnu-ld
x ./usr/bin/mipsel-linux-gnu-nm
x ./usr/bin/mipsel-linux-gnu-elfedit
x ./usr/bin/mipsel-linux-gnu-ar
x ./usr/bin/mipsel-linux-gnu-strings
x ./usr/bin/mipsel-linux-gnu-readelf

So please type:

/usr/bin/mipsel-linux-gnu-as -help

if you see the help text then everything is correctly installed on your 

Now make sure that you have BINUTILSPREFIX=mipsel-linux-gnu-as on your 
commandline whenever you try to compile a binary for mips and you should 
be sure that you are indeed using the right cross-versions of as & friends.

And now I'd start on commandline to see if everything works. Here's an 
example that should also work for you:

<PATHWHEREYOURCROSSCOMPILERIS>/ppcrossmipsel -Tlinux -Pmipsel 
-XPmipsel-linux-gnu- hello.pas

when this works and you get a binary (verify it by doing a: 
mipsel-linux-gnu-objdump -a hello.elf)

then next is:

fpc -Tlinux -Pmipsel -XPmipsel-linux-gnu- hello.pas

this will kick in the magic of fpc that selects the crosscompiler based 
on the fpc config files

If this build fails you will need to find out if fpc looks at the right 
places for your crosscompiler and your tools.


fpc -Tlinux -Pmipsel -XPmipsel-linux-gnu- hello.pas -vt

will help you a lot diagnosing problems with wrong paths.

if this now also works then you should have a look on integrating those 
parameters into lazarus (STEP4), doing it this way instead of starting 
with step four before step one should make your live a lot easier 
because the level of complexity and possible problems rises from step to 

Am 12.06.13 11:13, schrieb Dennis Poon:
> Michael,
> I just typed "ld -v" and it replied:
> GNU ld (GNU Binutils for Debian) 2.22
> I do agree they look different. I supposed they should look like 
> "mipsel-linux-ld"
> but I only followed the wiki.freepascal.org/MIPS_port doc step 1 which 
> stated http://www.emdebian.org/debian/pool/main/b/binutils/
> and on that page, the only package looke correct is: 
> "binutils-mips-linux-gnu_2.22-8_i386.deb" and 
> "binutils-mipsel-linux-gnu_2.22-8_i386.deb"
> After installing those, I got those as and ld files inside their 
> respective bin folder.
> Can anyone provide me with links of PROVED binutils for MIPS linux?
> Thanks,
> Dennis
>> On 06/09/2013 05:43 PM, Dennis Poon wrote:
>>> My binutils as , ld etc files are located at 
>>> /usr/mips-linux-gnu/bin/ ...
>> first try to start these files form the command-line. (e.g. "ld -v") 
>> If they don't work decently (which I do suppose), you need different 
>> files.
>> -Michael
>> _______________________________________________
>> 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.3345 / Virus Database: 3199/6403 - Release Date: 
>> 06/11/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