Skip to content

Revert "[libc++] Re-enable std::pair trivial copy constructor for FreeBSD >= 14" #142204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2025

Conversation

jrtc27
Copy link
Collaborator

@jrtc27 jrtc27 commented May 30, 2025

The ABI bump to adopt the conforming ABI v1 std::pair implementation did
not end up happening for FreeBSD 14, and instead this diff was reverted
downstream in FreeBSD[1]. Align the upstream ABI config with FreeBSD's
actual ABI.

[1] ce4f1f49e036 ("Revert commit 6255157 from llvm-project (by Dimitry Andric):")

This reverts commit 6255157.

…eBSD >= 14"

The ABI bump to adopt the conforming ABI v1 std::pair implementation did
not end up happening for FreeBSD 14, and instead this diff was reverted
downstream in FreeBSD[1]. Align the upstream ABI config with FreeBSD's
actual ABI.

[1] ce4f1f49e036 ("Revert commit 6255157 from llvm-project (by Dimitry Andric):")

This reverts commit 6255157.
@jrtc27 jrtc27 requested a review from a team as a code owner May 30, 2025 19:41
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 30, 2025
@llvmbot
Copy link
Member

llvmbot commented May 30, 2025

@llvm/pr-subscribers-libcxx

Author: Jessica Clarke (jrtc27)

Changes

The ABI bump to adopt the conforming ABI v1 std::pair implementation did
not end up happening for FreeBSD 14, and instead this diff was reverted
downstream in FreeBSD[1]. Align the upstream ABI config with FreeBSD's
actual ABI.

[1] ce4f1f49e036 ("Revert commit 6255157 from llvm-project (by Dimitry Andric):")

This reverts commit 6255157.


Full diff: https://github.com/llvm/llvm-project/pull/142204.diff

2 Files Affected:

  • (modified) libcxx/include/__configuration/abi.h (+1-1)
  • (modified) libcxx/include/__cxx03/__configuration/abi.h (+1-1)
diff --git a/libcxx/include/__configuration/abi.h b/libcxx/include/__configuration/abi.h
index 01a4a4c023983..cc4b930b3cf4a 100644
--- a/libcxx/include/__configuration/abi.h
+++ b/libcxx/include/__configuration/abi.h
@@ -130,7 +130,7 @@
 #  endif
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
-#  if defined(__FreeBSD__) && __FreeBSD__ < 14
+#  if defined(__FreeBSD__)
 #    define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 #  endif
 #endif
diff --git a/libcxx/include/__cxx03/__configuration/abi.h b/libcxx/include/__cxx03/__configuration/abi.h
index 740aec39a3487..81dd5b1c59610 100644
--- a/libcxx/include/__cxx03/__configuration/abi.h
+++ b/libcxx/include/__cxx03/__configuration/abi.h
@@ -116,7 +116,7 @@
 #  endif
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
-#  if defined(__FreeBSD__) && __FreeBSD__ < 14
+#  if defined(__FreeBSD__)
 #    define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 #  endif
 #endif

@jrtc27
Copy link
Collaborator Author

jrtc27 commented May 30, 2025

FYI @DimitryAndric @emaste

@DimitryAndric
Copy link
Collaborator

LGTM

@jrtc27 jrtc27 merged commit 35757d6 into llvm:main May 31, 2025
202 of 207 checks passed
@jrtc27 jrtc27 deleted the libcxx-always-enable-freebsd-pair-abi branch May 31, 2025 07:07
@ldionne
Copy link
Member

ldionne commented Jun 2, 2025

Out of curiosity, is there a plan to adopt it in FreeBSD 15 or later?

@DimitryAndric
Copy link
Collaborator

Originally the plan was to wait until libc++ bumped its official ABI to 2, then go with that instead, so as to avoid have to break the FreeBSD base system's ABI more than once. But for some reason libc++ has stayed in ABI v1 for years now. :)

I'd say that it depends on whether libc++ will ever ship ABI v2, if that is still another number of years out then it might make sense to at least break the std::pair ABI for FreeBSD 15. Which will involve bumping our libc++.so.1 to something higher, likely libc++.so.2. We've painted ourselves into a corner with that: if libc++ at some point ships ABI v2 and bumps its own soname to .2 it's going to be very confusing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants