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

Sven Barth pascaldragon at googlemail.com
Sat Jun 8 21:21:49 CEST 2013


On 08.06.2013 18:43, Dennis Poon wrote:
> Sven,
>
> I am more than happy to start all over with windows.
> Can give me instructions on how to install the crosstools and binutils
> for windows? and maybe add them to the doc as well?
> Will I need to install mingw and other c related stuff (like make
> command etc) in windows first?

I've never build binutils manually yet, so I'm not of much help here... :(

> Hopefully, after that I can just follow your instruction to build cross
> compilers in Windows word by word.
>> 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)
>>
>
> Sorry, I am really ignorant and don't know where to add the option?
> Should I modify the makefile? where should I add that option?

The command on the wiki should be

make all CPU_TARGET=mipsel OS_TARGET=linux BINUTILSPREFIX=

>>
>> 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.
>>
> I had problem compiling Lazarus, when I "make all install", it said:
> lazarus.pp(133,1) Error: Can't call the resource compiler
> "/usr/bin/fpcres", switching to external mode
> lazarus.pp(133,1) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> So I ended up downloading a debian Lazarus from Lazarus web site.

A downloaded Lazarus is ok.

> So far, I only had experience in compiling using Lazarus. Never used
> make or the fpc directly.
> Can you tell me the exact command I should use to 'point Lazarus to the
> direcdtory which you passed in INSTALL_PREFIX ....' and "add the
> remaining path to...'

Once you did the

make all install INSTALL_PREFIX=/whereever/you/want/fpc/trunk

which I mentioned at last in the wiki article you can in Lazarus just go 
to Options => Settings => Environment => Compiler path (or so, I'm using 
the German version) and enter the path to the fpc binary there (in the 
example above it would be /whereever/you/want/fpc/trunk/bin/fpc). You 
also need to generate a fpc.cfg (normally located in ~/.fpc.cfg). You 
can just backup the one stored there and replace all paths in there.

Regards,
Sven



More information about the fpc-pascal mailing list