On 6/16/2015 10:48 AM, Oliver Kowalke wrote:
2015-06-16 9:28 GMT+02:00 Vladimir Prus
: Depends on what value is correct. If the check can be formulated as
compiling some source, or running some tools, then it can be done.
AFAIK it is very hard or nearly impossible for code to detect for which ABI and/or binary format it is compiled for. ABI/binary format are set/specified by flags in the compiler command line. The address model can be detected over pointer size - but ABI ...?!
Right, at least GDB appear to have APCS vs AAPCS as a user option.
However, unless I am mistaken, all ARM variants use <abi>aapcs - so maybe it does not need to be detected at all, and can be removed from conditions?
For ARM this is true but not for the other architectures (MIPS for instance has 4 different ABIs).
Correct, but we're talking about ARM right now - there, adding <abi> to condition appears unnecessary and problematic. There is no chance of ambiguity between ARM and MIPs variants. Do you see any issues if <abi> property is removed from condition for all ARM variants?
boost.context determines the default values for ABI/binary-format on the values returned by 'os.name' and 'os.platform'. I don't know another way for reliable ABI/binary-format detection in boost.build.
For avoidance of doubt, do you mean "boost.build" specifically? From your first observation, it appears that it's hard to detect ABI in any build system not using mind reading technology? - Volodya