From 77d93a55f88ccc723511ac754b7c32d277b24980 Mon Sep 17 00:00:00 2001 From: yinchuang Date: Mon, 10 Feb 2025 20:42:51 +0800 Subject: [PATCH] Fix a test failure with mold linker Issue:IBL76D Signed-off-by: yinchuang --- ...test-failure-with-mold-linker-122587.patch | 30 +++++++++++++++++++ clang.spec | 6 +++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0028-Clang-NFC-Fix-a-test-failure-with-mold-linker-122587.patch diff --git a/0028-Clang-NFC-Fix-a-test-failure-with-mold-linker-122587.patch b/0028-Clang-NFC-Fix-a-test-failure-with-mold-linker-122587.patch new file mode 100644 index 0000000..803387b --- /dev/null +++ b/0028-Clang-NFC-Fix-a-test-failure-with-mold-linker-122587.patch @@ -0,0 +1,30 @@ +From 4c980f19b97434ee799033a65555192e8ab1dc49 Mon Sep 17 00:00:00 2001 +From: Younan Zhang +Date: Sat, 11 Jan 2025 19:17:09 +0800 +Subject: [PATCH] [Clang][NFC] Fix a test failure with mold linker (#122587) + +Mold prefers the suffix '$' for symbols like PLT and GOT entries, so +exclude these symbols as well. Otherwise, this test will fail for +developers using mold-linked Clang. + +Closes https://github.com/llvm/llvm-project/issues/76982 +--- + clang/test/LibClang/symbols.test | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clang/test/LibClang/symbols.test b/clang/test/LibClang/symbols.test +index fd2ff8bc6cd4..e12b4c9991b8 100644 +--- a/clang/test/LibClang/symbols.test ++++ b/clang/test/LibClang/symbols.test +@@ -1,6 +1,6 @@ + # Check that there are no unversioned clang symbols in libclang.so + RUN: llvm-nm -Dj --defined-only %libclang | grep -v -e '@@LLVM_[0-9]\+$' | not grep '^clang' + +-# Check that here are no local clang_ symbols (ignoring symbols with .cold or ++# Check that there are no local clang_ symbols (ignoring symbols with .cold or + # .localalias suffxies.) +-RUN: llvm-nm %libclang | not grep '[a-z] clang_[^.]\+$' ++RUN: llvm-nm %libclang | not grep '[a-z] clang_[^.$]\+$' +-- +2.25.1 + diff --git a/clang.spec b/clang.spec index 6ab574e..f8ab49c 100644 --- a/clang.spec +++ b/clang.spec @@ -44,7 +44,7 @@ Name: %{pkg_name} Version: %{clang_version} -Release: 32 +Release: 33 Summary: A C language family front-end for LLVM License: NCSA URL: http://llvm.org @@ -79,6 +79,7 @@ Patch24: 0024-Backport-PATCH-Clang-CodeGen-Add__builtin_bcopy.patch Patch25: 0025-clang-Increase-the-number-of-driver-diagnostics.patch Patch26: 0026-Driver-add-option-fGNU-compatibility-aliased-with-fg.patch Patch27: 0027-Driver-fix-compile-error-for-fGNU-compatibility.patch +Patch28: 0028-Clang-NFC-Fix-a-test-failure-with-mold-linker-122587.patch # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -440,6 +441,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{__cmak %{python3_sitelib}/clang/ %changelog +* Mon Feb 10 2025 yinchuang - 17.0.6-33 +- Fix a test failure with mold linker + * Wed Nov 27 2024 Yangzhenyu - 17.0.6-32 - add python3-clang and install scanbuild-py -- Gitee