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:

=======================================================
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -rf units_bs
make[4]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/packages/fpmkunit
'
make[3]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/packages'
make[2]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make rtl_smart FPC=D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/compiler/ppcrossmips.exe R
ELEASE=1
make[2]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make -C rtl smart
make[3]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl'
make -C linux smart
make[4]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make all LINKSMART=1 CREATESMART=1
make[5]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin/mips-linux-as.exe -EB -o D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/units/mips-linux/prt0.o mips/prt0.as process_begin: CreateProcess((null), C:\Program Files (x86)\CodeSourcery\Sourcer y G++ Lite\bin/mips-linux-as.exe -EB -o D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/u
nits/mips-linux/prt0.o mips/prt0.as, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
make[5]: *** [prt0.o] Error 2
make[5]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make[4]: *** [fpc_smart] Error 2
make[4]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make[3]: *** [linux_smart] Error 2
make[3]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl'
make[2]: *** [rtl_smart] Error 2
make[2]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make[1]: *** [build-stamp.mips-linux] Error 2
make[1]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make: *** [crossinstall] Error 2
=======================================================

ERROR ALARM !!!! *fu...*

so i checked the path:

D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\rtl\units\mips-linux

the path exists, but it is emty !!! so i dont know what should i do now ? a another path exists too:

D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\rtl\units\i386-win32

there are many files inside... Sven Barth, can you held me again ?

greez & big thx,
   sky...


Am 23.10.2012 23:09, schrieb Sven Barth:
On 23.10.2012 15:49, SkyDiablo wrote:
okay, what i have to try:

1. use lazarus 1.1 with FPC 2.7.1 (i386-win32-win32/win64) SVN-Revision
39124
2. download current fpc-build trunk 2.7.x -> D:\pas\trunc\fpcbuild\
3. compile with lazarus:
D:\pas\trunc\fpcbuild\fpcsrc\compiler\ppmipsel.lpi ->
D:\pas\trunc\fpcbuild\fpcsrc\compiler\mipsel\pp.exe

The first step is wrong. Compiling trunk is only supported by the last release of FPC which currently is 2.6.0.

Also the last step is wrong. That is only for compiler developers.

The correct way is the following:

Open a command line and navigate to D:\pas\trunc\fpcbuild\fpcsrc.
Execute the following command (placeholders that you need to replace correctly are marked as %...% and commented on below):

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%

PREFIX is the prefix of the GNU binutils you have either downloaded or build yourself. For MIPS it should be something like "mips-elf-" or "mips-linux-". BINUTILSDIR is the directory where the binutils binaries are located. Most especially "as" and "ld" (both with the %PREFIX% given above). INSTALLDIR is the directory where you want to install that FPC to. It should be a different directory from the "fpcsrc" directory. E.g.: D:\pas\trunc\fpcbuild\fpcsrc-install

Note: If your FPC 2.6.0 installation is not in "PATH" you need to add "FPC=path\to\your\fpc.exe" to your the commands containing "all".

Eventually you'll might also want to do a "make all install INSTALL_PREFIX=%INSTALLDIR%" before all that to install a win32 compiler and (to ease usage) the "fpc" binary.

You then need to add a fpc.cfg to %INSTALLDIR%\bin\i386-win32 (or to be more precise: the directory where the ppcrossmips binary is located). You can e.g. copy the one from your 2.6.0 installation and adjust the paths in it.

Then it should work to call either "INSTALLDIR\bin\i386-win32\fpc -Pmips" or "ppcrossmips" to compile for MIPS. You also need to either specify the values given for %PREFIX% and %BINUTILSDIR% either on the command line (using -XP%PREFIX% (e.g. "-XPmips-elf-") and -FD%BINUTILSDIR%) or in the fpc.cfg in the following way:

ifdef CROSSCOMPILING
ifdef CPUMIPS
-XP%PREFIX%
-FD%BINUTILSDIR%
endif
endif

If you use any Linux libraries (e.g. libc, sqlite, etc.) you need to have those available on your development system as well and pass the correct paths to the compiler (I don't remember the correct parameters though as I'm rather seldomly doing a cross compile... :( )

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to