Skip to content

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Sep 2, 2025

Backport b8456e2

Requested by: @amy-kwan

@llvmbot llvmbot requested a review from a team as a code owner September 2, 2025 17:21
@llvmbot llvmbot added this to the LLVM 21.x Release milestone Sep 2, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in LLVM Release Status Sep 2, 2025
@llvmbot
Copy link
Member Author

llvmbot commented Sep 2, 2025

@hubert-reinterpretcast What do you think about merging this PR to the release branch?

@github-project-automation github-project-automation bot moved this from Needs Review to Needs Merge in LLVM Release Status Sep 4, 2025
@tru tru merged commit 7a077a1 into llvm:release/21.x Sep 8, 2025
@github-project-automation github-project-automation bot moved this from Needs Merge to Done in LLVM Release Status Sep 8, 2025
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 8, 2025
@llvmbot
Copy link
Member Author

llvmbot commented Sep 8, 2025

@llvm/pr-subscribers-libcxx

Author: None (llvmbot)

Changes

Backport b8456e2

Requested by: @amy-kwan


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

2 Files Affected:

  • (modified) libcxx/lib/abi/CMakeLists.txt (+3)
  • (modified) libcxx/utils/libcxx/sym_check/util.py (+1-1)
diff --git a/libcxx/lib/abi/CMakeLists.txt b/libcxx/lib/abi/CMakeLists.txt
index 7c08bd06c50b2..8f277aad2dcd5 100644
--- a/libcxx/lib/abi/CMakeLists.txt
+++ b/libcxx/lib/abi/CMakeLists.txt
@@ -16,6 +16,9 @@ function(cxx_abi_list_identifier result triple abi_library abi_version unstable
   elseif("${triple}" MATCHES "freebsd")
     # Ignore the major and minor versions of freebsd targets.
     string(REGEX REPLACE "freebsd[0-9]+\\.[0-9]+" "freebsd" triple "${triple}")
+  elseif("${triple}" MATCHES "aix")
+    # Ignore the V.R.M.F version string of aix targets.
+    string(REGEX REPLACE "aix[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+" "aix" triple "${triple}")
   endif()
   list(APPEND abi_properties "${triple}")
   list(APPEND abi_properties "${abi_library}")
diff --git a/libcxx/utils/libcxx/sym_check/util.py b/libcxx/utils/libcxx/sym_check/util.py
index fc7ba4244ab5a..dbc886f29ddea 100644
--- a/libcxx/utils/libcxx/sym_check/util.py
+++ b/libcxx/utils/libcxx/sym_check/util.py
@@ -95,7 +95,7 @@ def is_xcoff_or_big_ar(filename):
     with open(filename, "rb") as f:
         magic_bytes = f.read(7)
     return (
-        magic_bytes[:4] in [b"\x01DF", b"\x01F7"]  # XCOFF32  # XCOFF64
+        magic_bytes[:2] in [b"\x01\xDF", b"\x01\xF7"]  # XCOFF32  # XCOFF64
         or magic_bytes == b"<bigaf>"
     )
 

Copy link

github-actions bot commented Sep 8, 2025

@amy-kwan (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

There are some problems with our ABI list checking exposed by recent
compiler/cmake upgrades.

- For symcheck, there are typos in how XCOFF magic are defined, we
intended the second two digits to be a hex value, but our syntax doesn't
say that. Thus this will never match a valid XCOFF file.
- AIX triples can have version numbers. Those need to be discarded when
looking for an libc++ ABI list, like we do for other targets.

(cherry picked from commit b8456e2)
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

Development

Successfully merging this pull request may close these issues.

4 participants