[fpc-devel] Error building branch targetandroid

Thomas Schatzl tom_at_work at gmx.at
Sat Jul 7 11:42:32 CEST 2012


Am 07.07.2012 09:57, schrieb Felipe Monteiro de Carvalho:
> Hello,
> In Mac OS X, using FPC 2.6.0 as a starting compiler I did:
> svn co http://svn.freepascal.org/svn/fpc/branches/targetandroid 
> targetandroid
> cd targetandroid
> make crossinstall CPU_TARGET=arm OS_TARGET=android OPT="-dFPC_ARMEL"
> CROSSOPT="-CpARMv6 -CfSoft"
> CROSSBINDIR=/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
> OPT=-dFPC_ARMEL BINUTILSPREFIX=arm-linux-androideabi-
> And I got the following strange error:
> /Users/felipe/Programas/targetandroid/compiler/ppcrossarm -Ur
> -Tandroid -Parm -XParm-linux-androideabi- -Xr -Ur -Xs -O2 -n 
> -Fi../inc
> -Fi../arm -Fi../unix -Fiarm -Fi../linux -Fi../linux/arm
> -FD/Users/felipe/Programas/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin
> -FE. -FU/Users/felipe/Programas/targetandroid/rtl/units/arm-android
> -dFPC_ARMEL -darm -dRELEASE -CpARMv6 -CfSoft -Us -Sg
> ../linux/system.pp
> arm.inc(906,2) Error: Unrecognized opcode rev
> arm.inc(906,6) Error: Assembler syntax error
> arm.inc(921,2) Error: Unrecognized opcode rev

The revision you have does not support the "rev" instruction when using 
-CpARMv6. Use -CpARMv5 (or no switch, as it is the default) to create 
the (cross-)compiler.
That has been fixed in a later revision in trunk.

The generated compiler can then be used to generate ARMv6 code, but of 
course still does not support the assembler "rev" instruction.

I will look at how much work it is to merge the branch to latest.

Note that if you want to try, some time ago android/x86 compiler 
support has been added (must add -Cfsse3 though to get valid 


More information about the fpc-devel mailing list