[fpc-devel] Testing MIPS: newbie questions

Pierre Free Pascal pierre at freepascal.org
Mon Oct 15 18:15:28 CEST 2012

  I have a small batch that I use for cross-compilation
from i386-win32 to mips(el)-linux.

E:\pas\trunk\fpcsrc\compiler>type  mipsel-cycle.bat
set CUR_FPC_VER=2.7.1
if "%1" == "cont" goto cont
make cycle OPT="-gl -al -n -O- -Ur -vw" OS_TARGET=linux CPU_TARGET=mipsel
if errorlevel 1 goto error
pscp -load gccmips .\ppcmipsel gcc42.fsffrance.org:bin
copy ppcrossmipsel.exe \pas\fpc-%CUR_FPC_VER%\bin\i386-win32
make -C ../rtl install FPC=ppcrossmipsel.exe PREFIX=/pas/fpc-%CUR_FPC_VER%
cd utils
del gppc386
make FPC=/pas/trunk/fpcsrc/compiler/ppcrossmipsel OPT=-gl clean all gppc386
pscp -load gccmips .\gppc386 gcc42.fsffrance.org:bin/gppcmipsel
cd ..
goto end
echo An error occurred

This uploads a native mipsel compiler that
is usable (at least as long as you don't work with too recent GNU as/ld,

muller at gcc42:~/pas/test$ ppcmipsel hello.pp
Assembler messages:
Error: -march=mips2 is not compatible with the selected ABI
hello.pp(14,18) Error: Error while assembling exitcode 1
hello.pp(14,18) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
muller at gcc42:~/pas/test$ as --version
GNU assembler (GNU Binutils)

 So most of the problems described in
should not be present anymore...


> -----Message d'origine-----
> De : fpc-devel-bounces at lists.freepascal.org [mailto:fpc-devel-
> bounces at lists.freepascal.org] De la part de Mark Morgan Lloyd
> Envoyé : lundi 15 octobre 2012 17:51
> À : fpc-devel at lists.freepascal.org
> Objet : Re: [fpc-devel] Testing MIPS: newbie questions
> Pierre Free Pascal wrote:
> >> -----Message d'origine-----
> >> De : fpc-devel-bounces at lists.freepascal.org [mailto:fpc-devel-
> >> bounces at lists.freepascal.org] De la part de Mark Morgan Lloyd
> >> Envoyé : lundi 15 octobre 2012 15:39
> >> À : fpc-devel at lists.freepascal.org
> >> Objet : [fpc-devel] Testing MIPS: newbie questions
> >>
> >> In trunk, is there any particular reason why tbs/tb0072.pp refers to
> >> CPUSMIPS rather than CPUMIPS?
> >   This is probably an error on my side :(
> > Fixed in rev 22655,
> > thanks for noticing!
> >
> >> I notice that in system.pp and in linux/ptypes.inc etc., conditionals
> >> refer to CPUMIPS while in other places they refer to CPUMIPS32 and/or
> >> CPUMIPSEL32. Is this correct?
> >
> >   CPUMIPS is defined for both mips big endian and little endian targets,
> > CPUMIPSEL is defined only for little endian mips target,
> > CPUMIPSEB is defined only for big endian mips target.
> >
> > CPUMIPS32 is here to specify that it is a 32bit system,
> > and to possibly separate out future 64bit specific code.
> > (Nothing ready on this side yet...)
> >
> >   I am not sure all of the uses in rtl are really correct
> > (in the sense that they apply to the right sub-category of target...)
> > Please do not hesitate to report all suspicious instances.
> >
> >   There are still plenty of bug in the code generator,
> > help would be most appreciated!
> Thanks for that. What I actually started with this morning was
> revisiting http://wiki.lazarus.freepascal.org/Native_MIPS_Systems and
> trying to crossbuild the RTL. I'm afraid that I didn't get very far
> which led me to look at the defines... should this work yet, or is a
> full test run a prerequisite?
> --
> Mark Morgan Lloyd
> markMLl .AT. telemetry.co .DOT. uk
> [Opinions above are the author's, not those of his employers or
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel

More information about the fpc-devel mailing list