[fpc-devel] Re: Building the Android branch

Sven Barth pascaldragon at googlemail.com
Tue Dec 18 18:38:34 CET 2012


Am 18.12.2012 17:47 schrieb "Thomas Schatzl" <tom_at_work at gmx.at>:
>
> Hi,
>
> On Tue, 2012-12-18 at 17:35 +0100, Sven Barth wrote:
> > > === objdump end ===
> > >
> > > The first one shouldn't be the full pathname... also isn't the linker
> > > on Android called "/system/bin/linker"?
>
> You're trying to generate an executable or a shared library (.so)?
>

A shared library as this is what's needed for usage of the LCL. See also
examples/androidlcl of a current Lazarus version (at least 1.0).

> > >
> > > Do I need any further options besides the -Xp..., -FD..., -Fl...,
> > > -CpARMv6 and -CfSoft to build a library?
> > Ok... first: it was a stray "-FLlibdl.so" from a former test with non
> > working binutils.
>
> You mean the one with the full path has been added in error?

Yes. The binutils with version 2.19 crashed without reasons and on the
Lazarus forum there were suggestions to add "-FLlibdl.so". I had added that
to the fpc.cfg and forgot to remove it when I cleanly rebuild with the 2.21
binutils. This was all before I started to write you.

> > When I remove it the library can't be linked though...
>
> What is "it" exactly? Which library cannot be linked? What's the error?

"it" was the "-FLlibdl.so" and "the library" is the one I'm trying to
build. Sorry for the confusion.

> Just checked, for libraries "/system/bin/linker" should be added
> automatically (compiler/systems/t_android.pas)
>
> > The following options are set in fpc.cfg for Android:
> >
> >   -XParm-linux-androideabi-
> >
-FDD:\Android\android-ndk-r8c\toolchains\arm-linux-androideabi-4.6\prebuilt\windows\bin
> >   -FlD:\Android\android-ndk-r8c\platforms\android-8\arch-arm\usr\lib\
> >
> > The following arguments are added by Lazarus (the last three were
> > already part of the project - removing -Xd does also not change
anything):
> >
> >   -MObjFPC -Scghi -O1 -Tandroid -Parm -Xs -XX -vewnhi -l
> > -Filib\arm-android -Fu..\..\lcl\units\arm-android\customdrawn
> > -Fu..\..\lcl\units\arm-android
> > -Fu..\..\components\lazutils\lib\arm-android
> > -Fu..\..\packager\units\arm-android -Fu. -FUlib\arm-android\
> > -FEandroid\libs\armeabi\ -oliblclapp.so -dLCL -dLCLcustomdrawn -dANDROID
> > -Xd -CpARMV6
>
> Looks okay, but I will see if I can find these tests I was mentioning.
> That stuff is on a different computer though.
>
> 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).

I will try that.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20121218/a61004d8/attachment.html>


More information about the fpc-devel mailing list