Hard float EABI won't work lazarus / 1-Linux ---------------------------------------------------------------------- Ocye · 2016-01-24 12:58 I build my arm compiler per Quotemake OPT="-dFPC_ARMHF" CPU_TARGET=arm CROSSOPT="-CpARMV7A -CaEABIHF -CfVFPV3" CROSSBINDIR="/usr/arm-none-eabi/bin" clean crosszipinstall (and extract the resulting zip to the right place) fpc -Parm -i (or ppcrossarm -i) tells me QuoteSupported ABI targets:   DEFAULT   EABIHF My fpc.cfg looks like this Quote#ifdef cpuarm #ifdef linux -Xd -Parm -Fl/usr/lib/gcc/arm-none-eabi/5.3.0 -Fl/usr/local/lib/qt4_arm -CpARMV7A -CaEABIHF -CfVFPV3 #endif #endif It is effective, meaning wrong settings fail during the compilation. The arm binutils are from Arch Linux (arm-none-eabi-gcc 5.3.0-1) installed in /usr/lib/gcc/arm-none-eabi/. The toolchain is copied from the device into /usr/local/lib/qt4_arm (actually it is from the plasma mobile/ubuntu touch installer), Qt4pas from somewhere else (libqt4pas5_2.5-14_armhf.deb), is also placed there. I can compile a simple Hello World program, but an application with LCL fails due to soft float. Quotereadelf -h project1 Flags:                             0x5000202, has entry point, Version5 EABI, soft-float ABI What have I missed? (Please no Codetyphon suggestions, I want to do it myself to understand the build process) Lazarus 1.7 r51363M FPC 3.0.0 x86_64-linux-qt ---------------------------------------------------------------------- Thaddy · 2016-01-24 13:32 I would use the linaro binutils. I don't think the non-eabi ones are correct. For armhf it is always better to use the linaro toolchain. Always. http://www.linaro.org/downloads/ these are all gnueabihf, so pick your platform... ---------------------------------------------------------------------- Ocye · 2016-01-24 14:05 Quote from: Thaddy on January 24, 2016, 02:32:06 pmI would use the linaro binutils. I don't think the non-eabi ones are correct. For armhf it is always better to use the linaro toolchain. Always. http://www.linaro.org/downloads/ these are all gnueabihf, so pick your platform... That does the trick. Downloaded the toolchain for little-endian / Linux and extracted only the content of arm-linux-gnueabihf into /usr/local/linaro. Built fpc with CROSSBINDIR="/usr/local/linaro/bin" and changed the path in .fpc.cfg in -Fl/usr/local/linaro/libc/usr/lib/ to match the other binutils. Now I get binaries with hard float that are immediately killed on the target platform. Looking for a debugger now... PS: Quote(gdb) run Starting program: /home/phablet/project1 During startup program terminated with signal SIGKILL, Killed. Any idea on that issue? ---------------------------------------------------------------------- Ocye · 2016-01-24 14:30 There is still a linker problem, I guess. Had to change my config to -CfVFPV3_D16 in order to align my project with /bin/bash using readelf -A. But ldd disagrees now (and the app crashes on start) Quotephablet@ubuntu-phablet:~$ ldd ./project1         not a dynamic executable phablet@ubuntu-phablet:~$ file ./project1 ./project1: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped phablet@ubuntu-phablet:~$ ldd /bin/bash         libtinfo.so.5 => /lib/arm-linux-gnueabihf/libtinfo.so.5 (0xb6ec2000)         libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6eae000)         libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6dc0000)         /lib/ld-linux-armhf.so.3 (0xb6f08000) phablet@ubuntu-phablet:~$ file /bin/bash /bin/bash: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=46943cea38a62570a7f7878d1ccc881fa8e29942, stripped