Linking failure for armv6 soft-float target
## Summary I have a project that I'm regularly cross-compiling from Windows to an old embedded arm11 box. Until now I was using a compiler I built in mid-2019, it was working perfectly fine but was missing a new feature I wanted to use. Today I decided to upgrade it to the latest main branch commit. Now it's unable to produce a binary because the linker detects VFP mismatches. My target CPU does not have any floating point registers. I've tracked down the issue to 245b58c249b4b29ffc54e6c1e50a1474cc84f7b1, where ARM attributes were introduced. Some of these attributes apparently have unfortunate effects for my specific target. ## System Information **Compiler:** x86_64-win64 **Cross compiler:** arm-linux (-O2 -Xs -dFPC_ARMEL -CpARMV6 -CfSoft) **CPU:** ARM1176EJ-S **Binutils version:** 2.29.1 (arm-linux-gnueabi) ## What is the current bug behavior? I'm getting a linker error for every single object file. ## What is the expected (correct) behavior? The compiler resepcts soft-float and doesn't attempt to set VFP arg passing attributes. ## Relevant logs and/or screenshots ``` (9015) Linking bin\linux-arm\libtest.so D:\FPCUpDeluxeTrunk\cross\bin\arm-linux\arm-linux-gnueabi-ld.exe: error: D:\FPCUpDeluxeTrunk\fpc\units\arm-linux\rtl\system.o uses VFP register arguments, bin\linux-arm\libtest.so does not D:\FPCUpDeluxeTrunk\cross\bin\arm-linux\arm-linux-gnueabi-ld.exe: failed to merge target specific data of file D:\FPCUpDeluxeTrunk\fpc\units\arm-linux\rtl\system.o ``` ## Possible fixes https://gitlab.com/freepascal.org/fpc/source/-/blob/1108d0360917223aa243e3ac0419499ec67803c2/compiler/arm/narmutil.pas#L240 Maybe add some logic around here that doesn't hardcode `1`.
issue