[Lazarus] Cross-compiling -> MIPS

Sven Barth pascaldragon at googlemail.com
Thu Oct 25 16:12:08 CEST 2012


Am 25.10.2012 12:06, schrieb SkyDiablo:
> so, next one. there was an fail PREFIX at all so i change it to 
> "mips-linux-gnu-", this scrips works at first:
>
> ===================================================
> set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
> (x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc;C:\Program Files 
> (x86)\CodeSourcery\Sourcery G++ Lite\bin
> set PREFIX=mips-linux-gnu-
> set INSTALLDIR="D:\fpc\install"
>
> cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
>
> make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX%
> make crossinstall OS_TARGET=linux CPU_TARGET=mips 
> BINUTILSPREFIX=%PREFIX% INSTALL_PREFIX=%INSTALLDIR%
> ===================================================
>
> but now, i get the following error:
>
[snip]
> C:/lazarus/fpc/2.6.0/bin/i386-win32/fpcmake.exe -p -Tmips-linux 
> Makefile.fpc
> Processing Makefile.fpc
> Error: No targets set
>

This is related to the fact that 2.6.0's fpcmake does not support 
mips-linux yet. Possible solution:

First do (once, independantly) the following:

(assuming the current dir is your 2.7.1 source directory)
cd utils\fpcm
make all

And then add "FPCMAKE=%YOURSOURCEDIR%\utils\fpcm\fpcmake.exe" to the 
"crossinstall" line. This should hopefully help...

Regards,
Sven

> Am 25.10.2012 08:39, schrieb Sven Barth:
>>
>> Am 24.10.2012 22:08 schrieb "SkyDiablo" <skydiablo at gmx.net 
>> <mailto:skydiablo at gmx.net>>:
>> >
>> > wow ! thats amazing!
>> >
>> > okay, i create the follow batch-file:
>> >
>> > =======================================================
>> > set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
>> (x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc
>> > set PREFIX=mips-linux-
>> > set BINUTILSDIR="C:\Program Files (x86)\CodeSourcery\Sourcery G++ 
>> Lite\bin"
>> > set INSTALLDIR="D:\fpc\install"
>> >
>> > cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
>> >
>> > make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX% 
>> CROSSBINDIR=%BINUTILSDIR%
>> > make crossinstall OS_TARGET=linux CPU_TARGET=mips 
>> BINUTILSPREFIX=%PREFIX% CROSSBINDIR=%BINUTILSDIR% 
>> INSTALL_PREFIX=%INSTALLDIR%
>> >
>> > pause
>> > =======================================================
>> >
>> > so, it runs and runs and runs... but then:
>> >
>>
>> The error says that it can't find the "mips-linux-as" executable 
>> which is because there are spaces in the path to it. This is 
>> something make handles rather badly...
>>
>> But you have already a part of the solution: you added the path to 
>> PATH. With that you can now simply remove the 
>> "CROSSBINDIR=%BINUTILSDIR%" from both commands and it should work.
>>
>> Regards,
>> Sven
>>
>>
>>
>> --
>> _______________________________________________
>> Lazarus mailing list
>> Lazarus at lists.lazarus.freepascal.org
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20121025/135d3895/attachment-0003.html>


More information about the Lazarus mailing list