[fpc-pascal] Android cross-compiler: arm-linux-androideabi- binutilsprefix

Florian Klämpfl florian at freepascal.org
Sun Dec 29 14:22:45 CET 2013


Am 29.12.2013 14:12, schrieb Reinier Olislagers:
> Complete log: http://pastebin.com/Bj2EGmWD
> 
> FPC trunk, trying to get an Android ARM cross compiler going.
> 1. Optimistically using FPC 2.6.2 as bootstrap - should I be using
> trunk? (Trying that now anyway)
> 
> Copied Android NDK crossbinutils (as.exe etc) and libs
> (crtbegin_dynamic.o, libc.so) etc.
> 
> This is the command I let fpcup execute to build the cross compiler:
> Executing : C:\development\fpcbootstrap\make.exe
> "FPC=C:\development\fpcbootstrap\ppc386.exe"
> "--directory=C:\development\fpctrunk"
> "INSTALL_PREFIX=C:\development\fpctrunk"
> "CROSSBINDIR=C:\development\cross\bin\arm-android" "UPXPROG=echo"
> "COPYTREE=echo" "all" "OS_TARGET=android" "CPU_TARGET=arm" "CROSSOPT=
> -CpARMV6" "OPT= -Xd -FlC:\development\cross\lib\arm-android"
> 
> 2. Running the module I get quite far until I suddenly see reference to
> a binutils prefix that I haven't set...:
> make.exe[5]: Entering directory `C:/development/fpctrunk/rtl/android'
> ...
> system.pp(380) Error: Assembler arm-linux-androideabi-as.exe not found,
> switching to external assembling
> 
> Am I doing something wrong? Should I rename the binutils from the NDK
> and use -XP/BINUTILSPREFIX?
> 
> This entry in fpc.cfg (fpc trunk) is ominous:
> # for android cross-prefix is set by compiler
> #ifdef android
> #undef NEEDCROSSBINUTILS
> #endif
> 
> Does fpc (trunk) require arm-linux-androideabi- ?
> (And if so, why?)

>From fpc/compiler/options.pas:

  { Set up a default prefix for binutils when cross-compiling }
  if source_info.system<>target_info.system then
    case target_info.system of
      { Use standard Android NDK prefixes }
      system_arm_android:
        utilsprefix:='arm-linux-androideabi-';
      system_i386_android:
        utilsprefix:='i686-linux-android-';
    end;






More information about the fpc-pascal mailing list