[fpc-devel] Building android-i386 [Was: Re: Building the Android branch]

Thomas Schatzl tom_at_work at gmx.at
Thu Dec 20 17:11:37 CET 2012


Hi,

On Thu, 2012-12-20 at 16:33 +0100, Sven Barth wrote:
> Am 20.12.2012 10:19, schrieb Thomas Schatzl:
> >
> >>> - if you are really interested about doing Android development, I
> >>> recommend getting a developer board. The emulator is really slow. Even
> >>> fast developer boards are really cheap now, e.g. quad-core 1.4Ghz ARMv7
> >>> with 1GB RAM for 70 USD (www.hardkernel.com , search for Odroid-U). This
> >>> device is actually pretty decent. Otherwise use an unused phone.
> >> Currently I'm mostly checking what would be necessary to get our Windows
> >> Mobile application (more or less) running on Android using
> >> LCL-CustomDrawn. For these tests the emulator and maybe my own Phone
> >> should be enough for now.
> > If it's only android you want to evaluate, you may want to give the
> > i386-android target which should also work with that branch a try. This
> > should work if you do not need OpenGLES or something hardware specific.
> > I do not actually know, but there should be i386/android simulator
> > images available. Performance of those should be much better. :)
> I now tried to rebuild for i386. This is the command I used (I already 
> replaced GOLD by the BFD linker):
> 
> make all OS_TARGET=android CPU_TARGET=i386 
> BINUTILSPREFIX=i686-linux-android- 
> CROSSBINDIR=D:\Android\android-ndk-r8c\toolchains\x86-4.6\prebuilt\windows\bin 
> CROSSOPT="-FlD:\Android\android-ndk-r8c\platforms\android-14\arch-x86\usr\lib"
> 

make clean crosszipinstall OS_TARGET=android CPU_TARGET=i386
CROSSBINDIR=[...]/android-ndk-r8c/toolchains/x86-4.6/prebuilt/linux-x86/bin BINUTILSPREFIX=i686-linux-android- OPT="" CROSSOPT=" -Cfsse3 -Fl[...]/android-ndk-r8c/platforms/android-14/arch-x86/usr/lib" PP=[...]/targetandroid/ppc386

(compiling from linux-i386 to android-i386)

went through here. Did you make sure that the correct fpcmake is used?
(and take care of the bfd/gold issue).

Note that to comply to the ABI, you need -Cfsse3.

You would also need -mstackrealign, but fpc generated code in that
branch does not have a 16 byte alignment requirement.

In trunk, iirc, default alignment is 16 bytes too, and there is a new
option for forced stack realignment. I think the other fpc developers
know better. You may also specify -Cppentium3.

Thomas





More information about the fpc-devel mailing list