[fpc-devel] targetandroid - x86 as target cpu

Thomas Schatzl tom_at_work at gmx.at
Thu Aug 9 20:08:44 CEST 2012


Hi,

On Thu, 2012-08-09 at 20:02 +0200, Dennis Spreen wrote:
> sorry for the simple "it does not work" statement.
> I've redone the command:
> 
>[...]
> ~/fpc/targetandroid/trunk/utils/fppkg$
> /home/dennis/fpc/targetandroid/trunk/compiler/ppcross386 -Tandroid
> -FEbin/i386-android -FUunits/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/rtl/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fcl-base/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fcl-xml/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fcl-process/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fcl-net/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fcl-passrc/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/paszlib/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/hash/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fppkg/units/i386-android -Fu/home/dennis/fpc/targetandroid/trunk/packages/fpmkunit/units/i386-android
> -Tandroid -XPi686-linux-android- -Xr -Ur -Xs -O2 -n
> -Fu/home/dennis/fpc/targetandroid/trunk/rtl/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/paszlib/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fcl-process/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/hash/units/i386-android
> -Fu/home/dennis/fpc/targetandroid/trunk/packages/fpmkunit/units/i386-android
> -di386 -dRELEASE -Cfsse3 -viq fppkg.pp
> (1002) Target OS: Android for i386
> (3104) Compiling fppkg.pp
> (9015) Linking bin/i386-android/fppkg
> /home/dennis/android/android-ndk-r8b/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/i686-linux-android-ld:
> cannot find -lc
> fppkg.pp(396,1) Error: (9013) Error while linking
> fppkg.pp(396,1) Fatal: (10026) There were 1 errors compiling module,
> stopping
> Fatal: (1018) Compilation aborted
> 
> it shows "cannot find -lc" ? well, I'll try r8. Ok, with r8 it's the same.
> 

The linker cannot find libc. There is not -Fl command in that parameter.
Multiple CROSSOPT probably overwrite each other, not append to the
command line.

> I'm using Free Pascal Compiler version 2.6.0-4 [2012/07/13] for i386
> with
>
> make clean crosszipinstall
> CROSSOPT=-Fl~/android/android-ndk-r8b/platforms/android-9/arch-x86/usr/lib
> OS_TARGET=android CPU_TARGET=i386 BINUTILSPREFIX=i686-linux-android-
> CROSSOPT=-Cfsse3

Try

make clean crosszipinstall
CROSSOPT="-Fl~/android/android-ndk-r8b/platforms/android-9/arch-x86/usr/lib -Cfsse3"
OS_TARGET=android CPU_TARGET=i386 BINUTILSPREFIX=i686-linux-android-

That should make it work.

Thomas





More information about the fpc-devel mailing list