Scott Bambrough wrote:
- Use ABI tagging (high effort, involving modifications to affected
projects - permits hardvfp ABI for explicitly selected functions)
This is the first time I hear this suggested, and it's quite a nice option
You will definitely need a source attribute to indicate what ABI a function has. As Scott says, the compiler can then call it appropriately. The issue about pointers-to-functions isn't insoluble; the attribute becomes part of the function type to a pointer to that function has type "pointer-to-hard-float-function", and the compiler can warn if you cast that away.
You could try to get away without a source attribute and have the linker generate fixup code when you call a function using the wrong ABI. That's theoretically possible, but it's a lot of work, and I don't really see that it's necessary.