I am working on a project where a static library is built with the ARM tool chain using the hard-float abi, and then is linked with other object files (generated with gcc). The linker is the gcc linker, and the linking stage takes place on a Raspberry pi. Currently everything works fine as long as the C code built with the ARM tool chain is fixed-point. But the gcc linker complains about undefined symbols of the form __hardfp_xxx (e.g. hardfp_pow) when the C dode built with the ARM tool chain uses floating-point. It looks like I am missing a library on the gcc side. Can anyone please point me to which library it might be? How are these __hardfp_xxx symbols handled by the gcc linker?
Thank you.
The first thing I'd suggest is that it's generally easier if your whole project is built with one compiler. If you are trying to build an application to run on Linux, the path of least resistance will normally be to use the GCC which comes with your Linux distribution for everything.
However, that might not be easy, for example if this library uses armcc extensions, and would be a lot of effort to port to a different compiler. In that case, armcc has the --library_interface= option, which should allow it to compile code which will be linked against a different C library to the one which ships with DS-5. If you are linking a Linux application using GCC, then you will probably want to use --library_interface=aeabi_glibc.
Thank you very much for your answer. Incidentally I have been using the --library_interface option over the last few days and it did indeed allow me to build my application on the Raspberry Pi. I am using aeabi_glibc_hardfp as the library interface setting. As it happens I am now hitting another problem when I run my application, related to enabling the Floating-Point Unit on the Pi. But that is another story. Your suggestion is indeed a good solution to the problem in this thread. Thank you again.