[fpc-devel] Building cross-compiler for arm-linux on win32

Yuriy Sydorov jura at cp-lab.com
Sun Dec 16 18:33:00 CET 2018


On 12/16/2018 1:01 PM, Nikolai Zhubr wrote:
> And, I still see tons of "ARM BLX instruction ..." warnings from ld of this kind:
> 
> C:\FPC\3.0.4\bin\i386-Win32\arm-linux-ld.exe: arm\units\arm-linux\rautils.o: warning: ARM BLX instruction targets ARM 
> function 'SYSTEM_$$_POS$CHAR$SHORTSTRING$$LONGINT'
> C:\FPC\3.0.4\bin\i386-Win32\arm-linux-ld.exe: arm\units\arm-linux\rautils.o: warning: ARM BLX instruction targets ARM 
> function 'fpc_shortstr_copy'
> C:\FPC\3.0.4\bin\i386-Win32\arm-linux-ld.exe: arm\units\arm-linux\rautils.o: warning: ARM BLX instruction targets ARM 
> function 'fpc_shortstr_to_shortstr'
> C:\FPC\3.0.4\bin\i386-Win32\arm-linux-ld.exe: arm\units\arm-linux\rautils.o: warning: ARM BLX instruction targets ARM 
> function 'SYSTEM_$$_DELETE$OPENSTRING$LONGINT$LONGINT'
> 
> Currently, my build command is:
> make OS_TARGET=linux CPU_TARGET=arm NOGDB=1 CROSSCOMPILE=1 CROSSOPT="-CpARMV6 -Cfsoft" all

FPC 3.0.4 generates BLX instructions while it must not do that. It is fixed in FPC trunk and the 3.2 branch. You can try 
to build the trunk version and test.
Or as a workaround you can set the armv5 cpu type via the -Cparmv5 switch. In such case BLX will not be used by FPC 
3.0.2 too.

Yuriy.



More information about the fpc-devel mailing list