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

Michael Ring mail at michael-ring.org
Sun Jun 9 14:56:27 CEST 2013


I've browsed through this thread, as fas as I can see you are still on your intel-based linux box and you are trying to build a crosscompiler for mipsel.

If this is still correct then your problem at this stage is that you did not define the BINUTILSPREFIX correctly. When you leave this definition empty then the standard asembler of your linux distribution gets called and on an intel based linux box this assembler does only understand intel assembler and has no support for mips built in. This is why you get the as error that tells you that mips32 is an unknown option because this option only exists in a version of as that is compiled to support mips32.

As far as I understand this thread you have already installed binutils for mips on your linux box, now you need to do two things:

You need to make sure that the binaries from this binutils package are on your path. Can you please write 'mips' on your linux command prompt and then hit the tab key? You should now see a list of all binaries that start with mips...

This list should include something like mipsel-linux-gnu-as. 

When you have it then type 

mipsel-linux-gnu-as --help

When you receive the help content then you are all set, if not you propably have installed a version that is natively built to run on mips-linux, in this case you first have to find cross-binutils for your linux dist.

Still good?

Then please now try to compile, this time add 

BINUTILSPREFIX=mipsel-linux-gnu-

to the make command. 

Of course, if you crossassembler has a different name then please substitute this name with the mipsel-linux-gnu-as example I used here.

Michael



Von meinem iPad gesendet

Am 09.06.2013 um 12:54 schrieb Dennis Poon <dennis at avidsoft.com.hk>:

> Sven,
>> make all CPU_TARGET=mipsel OS_TARGET=linux BINUTILSPREFIX=
> 
> my  fpc folder is /home/dennis/fpc
> 
> I already login as root and issue the above command as you instructed but I got:
> 
> /bin/rm -f /home/dennis/fpc/rtl/units/mipsel-linux/math.rst /home/dennis/fpc/rtl/units/mipsel-linux/varutils.rst /home/dennis/fpc/rtl/units/mipsel-linux/typinfo.rst /home/dennis/fpc/rtl/units/mipsel-linux/variants.rst /home/dennis/fpc/rtl/units/mipsel-linux/sysconst.rst /home/dennis/fpc/rtl/units/mipsel-linux/rtlconsts.rst /home/dennis/fpc/rtl/units/mipsel-linux/stdconvs.rst
> /bin/rm -f fpcmade.mipsel-linux Package.fpc ./ppas.sh script.res link.res
> /bin/rm -f *.s *_ppas.sh
> make[5]: Leaving directory `/home/dennis/fpc/rtl/linux'
> make[4]: Leaving directory `/home/dennis/fpc/rtl'
> make -C /home/dennis/fpc/rtl 'OPT=  ' all
> make[4]: Entering directory `/home/dennis/fpc/rtl'
> make -C linux all
> make[5]: Entering directory `/home/dennis/fpc/rtl/linux'
> as -32 -mips32 -EL -o /home/dennis/fpc/rtl/units/mipsel-linux/prt0.o mipsel/prt0.as
> as: unrecognized option '-mips32'
> make[5]: *** [prt0.o] Error 1
> make[5]: Leaving directory `/home/dennis/fpc/rtl/linux'
> make[4]: *** [linux_all] Error 2
> make[4]: Leaving directory `/home/dennis/fpc/rtl'
> make[3]: *** [rtl] Error 2
> make[3]: Leaving directory `/home/dennis/fpc/compiler'
> make[2]: *** [cycle] Error 2
> make[2]: Leaving directory `/home/dennis/fpc/compiler'
> make[1]: *** [compiler_cycle] Error 2
> make[1]: Leaving directory `/home/dennis/fpc'
> make: *** [build-stamp.mipsel-linux] Error 2
> 
> Any idea what happened?
> 
> Thanks.
> 
> Dennis
> _______________________________________________
> 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