0

I would like to link a cross-compiled library (library.a) compiled with soft floating point support (arm-none-eabi) on a system with support for hard floats (Raspberry Pi - armv7l-unknown-linux-gnueabihf) and run it with a test application.

Unfortunately I am getting a linker error:

/usr/bin/ld: error: application uses VFP register arguments library.a(library.c.obj) does not.

Any idea on how I could tell to gcc to build the executable with soft floats and the link to the rest of the system with VFP register arguments?

An alternative approach I have tried is to use the gcc-arm-none-eabi package available on raspian. I tried compiling my dependencies with

export CC="arm-none-eabi-gcc -I/usr/arm-linux-gnueabi/include/"
export LD="arm-none-eabi-ld -L/usr/arm-linux-gnueabi/lib/"

Unfortunately this compiler does not have Linux support integrated and I'm missing various references.

My current bet is now to build a cross-compiler toolchain with soft float for the raspian and the use this build to link and run my application.

Pascal
  • 831
  • 2
  • 11
  • 24
  • 1
    have a look here : https://stackoverflow.com/questions/9753749/arm-compilation-error-vfp-registered-used-by-executable-not-object-file try using softFP abi. This means the call convention will be compatible with your pureSoft library but still use hardFloat on the hardware. (also have a look here http://doc.ironwoodlabs.com/arm-arm-none-eabi/html/getting-started/sec-armfloat.html) – Julien Jan 12 '18 at 13:05
  • 2
    Possible duplicate of [ARM compilation error, VFP registered used by executable, not object file](https://stackoverflow.com/questions/9753749/arm-compilation-error-vfp-registered-used-by-executable-not-object-file) – Julien Jan 12 '18 at 13:07

0 Answers0