[fpc-devel] Re: Building the Android branch
tom_at_work at gmx.at
Wed Dec 19 16:42:56 CET 2012
a few notes:
On Wed, 2012-12-19 at 16:20 +0100, Sven Barth wrote:
> Am 18.12.2012 17:47, schrieb Thomas Schatzl:
> > Looking through compiler/systems/t_android.pas, you may want to try
> > commmenting line 343, the one that adds info.Dynamiclinker to the
> > input files. Looks wrong. (system/bin/linker is passed to ld later as
> > --dynamic-linker option later anyway).
> Ok... by removing the addition of the dynamic linker I can successfully
> compile and link the DLL, but when starting it I get an illegal
> instruction error... I have not yet tested whether this can be
> reproduced with an empty library as well.
> === logcat begin ===
> === logcat end ===
> Edit: Linking with debug information I could resolve the address to
> InterlockedExchange. Hmm... It seems that the SDK's QEMU does not
> emulate a ARMv6 device?
- yes. See http://developer.android.com/tools/devices/emulator.html.
Btw, there is not much point to compiling for armv6 for Android. The two
official ABIs are either armv5te + softfloat or armv7a + vfpv3_d16
- there were lots of fixes to ARM interlocked* stuff and barriers some
months ago in trunk. All these changes are not in the targetandroid
- the (trunk) rtl still has some issues related to automatic detection
and use of read/writebarrier code if you compile for an older cpu but
run on newer. E.g. if you compile for armv5, these barriers are nops
because they are not needed - but when actually running on something
higher these nops are not optimal to say at least.
If your stuff is not threaded or you don't run on a multi-core cpu, this
is not a problem.
- 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.
More information about the fpc-devel