Since ~2013 we have been using the earliest std::pair ABI in libc++,
where std::pair did not have a trivial copy constructor. This was
originally a defect in the C++ standard, which was corrected in
https://github.com/llvm/llvm-project/commit/ccad8c32e088.
However, as the upstream commit message explains, the Itanium ABI
specifies different calling conventions for trivial and non-trivial copy
constructors; therefore this changed the libc++ ABI. In a follow-up
commit https://github.com/llvm/llvm-project/commit/f9fd0d6d113c, the
change was made optional with a compile-time define, which FreeBSD has
been using ever since, to keep the old ABI. (E.g., our std::pair copy
constructors are never trivial.)
Since the non-triviality of std::pair constructors sometimes causes
build problems with C++ programs (for instance llvm-project itself, see
https://github.com/llvm/llvm-project/issues/55414), we will now
re-enable the new std::pair ABI for FreeBSD 14 and later.
To safely do this, bump the libc++.so version to 2, so older programs
can keep working with the old libc++.so.1, which will be moved into a
ports compat package.
MFC after: never
Relnotes: yes