Hi;
I have built 'Compute Library' as said in Bare Metal Building section of documentation by using Linaro toolchain on Ubuntu. I'm targetting bare-metal.
On another machine, I want to use this library but this machine has an Arm Compiler 6 version and I want to use it as my toolchain.
While linking, I get errors like
L6242E: Cannot link object <objname> as its attributes are incompatible with the image attributes.
it says packed-enum is not compatible with enum_is_int.
I tried to play with compiler option, -fshort-enums, -fno-short-enums but couldn't succeded.
So my question is, is it possible to call methods from a library that is build by Linaro Toolchain from another executable that is build by Arm Compiler 6(armclang).
If possible, Which options should I set?
Hi,
In the general case, all compilers implement the Arm ABI, a binary standard intended to provide compatibility between compilers. So it should be possible to build libraries with one compiler, and link them using another. However, this sometimes isn't as simple or as easy as we might like, as there are sometimes different versions of the ABI to cope with different packing types, variable sizes etc. It's a case of configuring both compilers so they align on their use of ABI variants.
I'll send you a private message, let's see if we can get you going.
Thanks,
Paul.
Sure, waiting for your response
Hello Yunus,
The Compute Library is using the C++ standard library and exception handling thus you should be careful when mixing GCC and Armclang as they might have different implementation and could lead to link/run-time issues.
However, you could compile Compute Library with Armclang and then use it. I tried myself to build it but unfortunately some build issues emerged that are most likely trivial to fix.We are looking in creating a patch and supporting armclang for building Compute Library. We will push the patch in our development repository here and update you once done.Hope this helps.
Best Regards,
George