[fpc-devel] FPC for MIPS

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Tue Jan 15 16:31:41 CET 2013


SkyDiablo wrote:
> Am 15.01.2013 11:46, schrieb Mark Morgan Lloyd:
>> SkyDiablo wrote:
>>> hi ho,
>>>
>>> i'm back again ;) i have try this:
>>>
>>> http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg27336.html
>>>
>>> but my Ubuntu Desktop 12.04 LTS can't run the "ppcmips" binary?
>>>
>>> $ chmod +x ppcmips
>>> $ ./ppcmips -iV
>>> bash: ./ppcmips: Kann die Datei nicht ausführen. (Can't run this file)
>>>
>>> so, if there are any other solution to compile fpc code for MIPS/linux?
>>
>> We've been round this one before. Refer to 
>> http://wiki.lazarus.freepascal.org/Native_MIPS_Systems which shows 
>> you- step-by-step- how to build cross-binutils, a cross-compiler and 
>> then a native compiler for either little- or big-endian MIPS.
>>
>> The current state is that the compiler runs sufficiently well to build 
>> itself on a Linux MIPS system, a high proportion of the test suite 
>> runs, but it's not yet complete enough for build a runnable Lazarus IDE.
>>
>> I can't do much more on little-endian since the system I thought I'd 
>> been promised didn't arrive. What's more I spent three weeks keeping a 
>> careful watch for carriers, and that Did Not Help. I've got a couple 
>> of big-endian systems in the collection but they aren't (yet) running 
>> Linux (IRIX only, and I don't thing a port is remotely feasible).
>>
> 
> ok, i try this step-by-step and get now this error:
> 
> $ make "OPT=-O- -g" -C compiler mips
> make: Gehe in Verzeichnis '/usr/local/src/fpc-trunk/compiler'
> make PPC_TARGET=mips CPU_UNITDIR=mips all
> make[1]: Betrete Verzeichnis '/usr/local/src/fpc-trunk/compiler'
> /usr/bin/ppc386 -Fumips -Fusystems -Fu../rtl/units/i386-linux -Fimips 
> -FE. -FUmips/units/i386-linux -O- -g -dmips -dGDB -dBROWSERLOG -Sew pp.pas

1) Are you trying to build for big- or little-endian? Because that 
command is from the big-endian section of the page.

2) Do you have a standard /etc/fpc.cfg?

3) What version of the FPC compiler etc. are you using?

4) Are you using the sources recently checked out from subversion?

5) Have you build binutils of the recommended version?

6) Immediately before that command, what is the value of the PP shell 
variable?

7) To get context, what is the last line of explanatory text immediately 
before you've entered that command?

8) Please could a German-speaker comment on those error messages?

I admit to being slightly stumped by this, because I specifically noted 
the commands in the second part of that page (for big-endian MIPS) to 
illustrate that transcription from the first part (little-endian) 
worked. The only thing that you need to be *careful* *about* is the 
*directory* *structure* - but I'd hoped that was pretty obvious- and in 
the case of big-endian the name of the directories that are storing the 
unit files.

I'm by no means experienced at this, and if I can do it I don't see why 
you shouldn't be able to.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list