[fpc-devel] Re: Building the Android branch

Thomas Schatzl tom_at_work at gmx.at
Tue Dec 18 17:47:00 CET 2012


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)?

> >
> > 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?

> When I remove it the library can't be linked though...

What is "it" exactly? Which library cannot be linked? What's the error?

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).

Thomas





More information about the fpc-devel mailing list