View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0022818||FPC||Installer||public||2012-09-06 17:26||2012-09-07 12:56|
|Reporter||Seva Alekseyev||Assigned To||Felipe Monteiro de Carvalho|
|Summary||0022818: Introduce ARMv7 with floating point as a separate CPU architecture on Android|
|Description||The native code subsystem of Android allows for two flavors of the ARM instruction set - v6 (armeabi) and v7 (armeabi-v7a). The latter allows for hardware floating point instructions (VFPv3-D16 according to the Google docs).|
The Android branch of Free Pascal comes with a RTL that is built for ARMv6 without floating point support. Trying to compile with -CfVFPV3 fails with the following message:
PPU Loading C:\FPC\2.6.0\units\arm-linux\rtl\system.ppu
Trying to use a unit which was compiled with a different FPU mode
It would be nice if a build of the RTL with hardware floating point existed, was constructed by the build script, and would coexist with the existing ARM-Android RTL.
|Steps To Reproduce||Install the Android branch of Free Pascal - either prebuilt, or build it from the source, the instructions are here: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Configuring_the_Free_Pascal_Compiler_for_Android|
Write the file a.pas with the following content:
Compile the file with the following command:
fpc -Xd -CfVFPV3 -dAndroid -Parm -Tlinux -Flc:\android-ndk-r8b\platforms\android-9\arch-arm\usr\lib a.pas
(the path to the NDK may vary)
Watch the error message.
|Tags||No tags attached.|
|Fixed in Revision|
Trying to build the RTL for floating point fails, too. Executing the following from the rtl folder:
make OPT="-dFPC_ARMEL -CpARMV7M -CfVFPV3 -dAndroid"
yields a lot of errors. Looks like the assumptions of the CPU vary between code generator and the NDK assembler.
||I don't know which branch you are building. If you are building the same outdated 2.5.1 branch the binary release linked from that wiki page is built from: then it's probably logical, since that compiler simply does not contain any Android NDK support whatsoever. It's just some people using a Linux RTL in an unsupported configuration. Proper Android/ARM support is being worked on in the http://svn.freepascal.org/svn/fpc/branches/targetandroid/ branch.|
If so, please do something about that wiki page. Right now, it's the top search result for "free pascal android".
The 2.5.1 build can provide some working output on a dummy project. It's not totally useless.
That page was created by Felipe, which is why I assigned this issue to him. For some reason, he's not been able to build the official Android fpc branch yet, which is probably why his page is still mentioning that old version.
I also didn't say that binary is totally useless, just that it's an unsupported hack.
||Compared to that 2.5.1 branch, how far along is the official one, please? I'm not after the full cycle of Android development - I want to compile a bunch of Pascal units, make an .a library, and link with an NDK project.|
||I'm closing this bug as a duplicate of 0020726, since that one tracks the development of the Android branch. As far as I know, it should already work, but it's probably best to ask there so that the maintainer of that branch (Thomas Schatzl) can answer you.|
|2012-09-06 17:26||Seva Alekseyev||New Issue|
|2012-09-06 17:52||Jonas Maebe||FPCOldBugId||=> 0|
|2012-09-06 17:52||Jonas Maebe||Category||Compiler => Installer|
|2012-09-06 17:58||Jonas Maebe||Status||new => assigned|
|2012-09-06 17:58||Jonas Maebe||Assigned To||=> Felipe Monteiro de Carvalho|
|2012-09-06 18:26||Seva Alekseyev||Note Added: 0062143|
|2012-09-06 20:58||Jonas Maebe||Note Added: 0062149|
|2012-09-07 00:42||Seva Alekseyev||Note Added: 0062152|
|2012-09-07 00:53||Jonas Maebe||Note Added: 0062153|
|2012-09-07 01:27||Seva Alekseyev||Note Added: 0062154|
|2012-09-07 12:56||Jonas Maebe||Relationship added||duplicate of 0020726|
|2012-09-07 12:56||Jonas Maebe||Duplicate ID||0 => 20726|
|2012-09-07 12:56||Jonas Maebe||Status||assigned => resolved|
|2012-09-07 12:56||Jonas Maebe||Resolution||open => duplicate|
|2012-09-07 12:56||Jonas Maebe||Note Added: 0062163|