[fpc-devel] FPC for Linux-ARM

Henry Vermaak henry.vermaak at gmail.com
Tue Jan 18 18:36:58 CET 2011


On 18/01/11 12:58, Felipe Monteiro de Carvalho wrote:
> On Tue, Jan 18, 2011 at 12:00 PM, Henry Vermaak<henry.vermaak at gmail.com>  wrote:
>> Try using crosszipinstall.
>
> I tryed:
>
> make crosszipinstall CPU_TARGET=arm OS_TARGET=linux
> CROSSBINDIR=/home/felipe/Programas/fpctrunk/binutils OPT=-dFPC_ARMEL
> INSTALL_PREFIX=/usr/
>
> and
>
> make crosszipinstall CPU_TARGET=arm OS_TARGET=linux
> CROSSBINDIR=/home/felipe/Programas/fpctrunk/binutils OPT="-dFPC_ARMEL
> -FD/home/felipe/Programas/fpctrunk/binutils" INSTALL_PREFIX=/usr/
>
> but:
>
> make -C gtk2 install
> make[5]: Entering directory `/home/felipe/Programas/fpctrunk/packages/gtk2'
> /home/felipe/Programas/fpctrunk/compiler/ppcrossarm -Parm -Ur -Xs -O2
> -n -Fusrc -Fusrc/glib -Fusrc/atk -Fusrc/pango -Fusrc/pangocairo
> -Fusrc/gtk+/gdk-pixbuf -Fusrc/gtk+/gdk -Fusrc/gtk+/gtk -Fusrc/libglade
> -Fusrc/gtkglext -Fusrc/gtkext -Fusrc/gtk2x11
> -Fu/home/felipe/Programas/fpctrunk/rtl/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/pasjpeg/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/hash/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/paszlib/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/fcl-base/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/fcl-image/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/x11/units/arm-linux
> -Fu/home/felipe/Programas/fpctrunk/packages/cairo/units/arm-linux
> -Fisrc/gtk2x11/include -FD/home/felipe/Programas/fpctrunk/binutils
> -FE. -FUunits/arm-linux -Fl/usr/lib/gcc/i586-manbo-linux-gnu/4.4.3
> -Flinclude -Fl/etc/ld.so.conf.d/*.conf -Fl/usr/X11R6/lib -dFPC_ARMEL
> -darm -dRELEASE  src/buildgtk2.pp
> /usr/bin/as: unrecognized option '-mfpu=softvfp'
> buildgtk2.pp(37) Error: Error while assembling exitcode 1
> buildgtk2.pp(37) Fatal: There were 2 errors compiling module, stopping
> Fatal: Compilation aborted
>
> No idea why it is using /usr/bin/as when it should use a cross-binutil

Try to replace "crosszipinstall" with "info" in your command.  This will 
tell you what tools it's trying to use.

What I do, is add the directory where I've installed my binutils to the 
path, like this:

export PATH=/opt/arm-linux/bin/:$PATH

This directory contains the cross binutils with the prefix "arm-linux-".

Then I can build it like this:

make -s clean crossall crosszipinstall FPC="/path/to/bootstrap/ppc" 
CPU_TARGET=arm NOWPOCYCLE=1 OPT="-dFPC_ARMEL" CROSSOPT="-CfSOFT" 
BINUTILSPREFIX=arm-linux-

Then you know the compiler will look for arm-linux-as and arm-linux-ld, 
which will save you some confusion.  You can also use CROSSBINDIR 
instead of changing the path.

Henry



More information about the fpc-devel mailing list