Subject: Re: [boost] ABI issues with -std
From: Edward Diener (eldiener_at_[hidden])
Date: 2018-08-19 19:56:15
On 8/19/2018 11:17 AM, Peter Dimov via Boost wrote:
> At some point, we'll need to acknowledge the problem which results from
> building Boost with one -std and user code with another, and deal with
> it somehow, if just by documenting.
> Most of our libraries don't suffer from it at the moment but
> Boost.System does, because of my changes; its ABI changes between
> 03/11/14. So I'm going to take the initial hit. :-)
> POSIX platforms have long been able to ignore ABI issues so we don't
> mangle the library names there at all, but now whether one builds Boost
> for C++03, C++11 or C++14 matters, and there's nothing to prevent
> linking C++xx to C++yy. Even with --layout=versioned, the cxxstd level
> is not encoded.
> The fact that the default C++ standard differs between g++ and clang++
> doesn't help; when following the instructions of doing "b2 install",
> with g++6 and above you get C++14, but with g++5 or clang++ you get
> C++03. The latter is very rarely what one wants today.
Are not ABI changes a compiler issue ? I do not see that there is any
inherent reason why building code with some -std, and using it with code
built to another -std, should cause ABI issues when the compiler remains
the same. I admit I do not know whether ABI compatibility is addressed
by the C++ standard itself, although I expect not.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk