Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-12

Android cross-compiler: arm-linux-androideabi- binutilsprefix

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Florian Klämpfl
to Reinier Olislagers
Reinier Olislagers wrote 38 lines
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.systemtarget_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;
Reinier Olislagers
to Florian Klämpfl
Florian Klämpfl wrote 15 lines
Am 29.12.2013 14:12, schrieb Reinier Olislagers: > 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.systemtarget_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;

Thanks.
I see I probably copied over the wrong directory from the NDK: the one from arm-linux has
android-ndk-r9c\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\arm-linux-androideabi\bin\as.exe etc
as well as
D:\cop\t\android-ndk-r9c\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\bin\arm-linux-androideabi-as.exe

Sorry about that; I'll fix things up, try again... and get back if needed.