[fpc-devel] how to build FPC for armel
darekm at emadar.com
darekm at emadar.com
Sat Dec 12 15:38:54 CET 2009
>
> On 12 Dec 2009, at 01:14, darekm at emadar.com wrote:
>
>> this is good (mentioned bug goes off) configuration
>> make crossinstall CPU_TARGET=arm OS_TARGET=linux
>> CROSSBINDIR=/home/darek2008/fpcarm/arm-linux-uclibc/bin
>> CROSSOPT="-dFPC_ARMEL -CfSOFT -gl -O2"
>> INSTALL_PREFIX=/home/darek2008/fpcarm COMPILER_OPTIONS="cpufpemu -a"
>
> Always first do a "make clean all" before doing any kind of install.
> Directly doing a "make install" or "make crossinstall" without doing a
> regular "make all" first is not supported. Also, when building a
> cross-compiler, make sure that you start with a native compiler built from
> the same FPC revision, because when building a cross-compiler the native
> compiler will not be fully cycled first.
I always do this
>
> This is how I built my cross-compiler (ppn40 is a native i386 compiler):
>
> make FPC=~/afshome/bin/ppn40 OPT="-dFPC_ARMEL"
> CROSSOPT="-XParm-linux-gnueabi- -FD/home/jmaebe/crosstest/bin -dFPC_ARMEL
> -Cfsoft -Xd -O2" CPU_TARGET=arm all -j 2
No luck to build. Below last part of make:
/bin/mkdir -p arm/units/arm-linux
/home/darek2008/svn-fpc/compiler/ppcrossarm -Parm -Ur -Xs -O2 -n -Fuarm
-Fusystems -Fu/home/darek2008/svn-fpc/rtl/units/arm-linux -Fiarm
-FD/home/darek2008/fpcarm/arm-linux-uclibc/bin -FE. -FUarm/units/arm-linux
-dRELEASE -dFCP_ARMEL -Cfsoft -Xd -O2 -dFCP_ARMEL -Cfsoft -Xd -O2 -darm
-dGDB -dBROWSERLOG pp.pas
cgobj.pas(3478,38) Warning: range check error while evaluating constants
symdef.pas(4952,10) Warning: User defined: : this is completely wrong on
so many levels...
/home/darek2008/fpcarm/arm-linux-uclibc/bin/ld:./link.res: file format not
recognized; treating as linker script
/home/darek2008/fpcarm/arm-linux-uclibc/bin/ld:./link.res:289: syntax error
pp.pas(223,27) Error: Error while linking
pp.pas(223,27) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [ppcarm] Błąd 1
make[3]: Opuszczenie katalogu `/home/darek2008/svn-fpc/compiler'
make[2]: *** [cycle] Błąd 2
make[2]: Opuszczenie katalogu `/home/darek2008/svn-fpc/compiler'
make[1]: *** [compiler_cycle] Błąd 2
make[1]: Opuszczenie katalogu `/home/darek2008/svn-fpc'
make: *** [build-stamp.arm-linux] Błąd 2
the same as crossinstall build has success, but compile program has
linking error:
Free Pascal Compiler version 2.5.1 [2009/12/12] for arm
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for ARMEL
Compiling hello.pas
Assembling hello
Linking hello
/home/darek2008/fpcarm/arm-linux-uclibc/bin/ld:link.res:207: syntax error
hello.pas(20) Error: Error while linking
hello.pas(20) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
>
> I don't understand what your COMPILER_OPTIONS parameter is for. The
> "cpufpemu" will be interpreted by the compiler as the name of a source
that was drawn from net
> file (and subsequently be overridden by the real source file that comes
> after it), and "-a" tells the compiler to leave the generated assembler
> files behind. You can just as well use OPT="-a".
Darek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: link.res
Type: application/octet-stream
Size: 11904 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20091212/e8568334/attachment.obj>
More information about the fpc-devel
mailing list