From 9a7b4ac902c2719d81e4f60b22683803096c35f3 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 24 Jan 2023 22:38:21 +0000 Subject: [PATCH] Add back 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch --- ...ed-libraries-to-customize-the-soname.patch | 39 +++++++++++++++++++ clang.spec | 1 + 2 files changed, 40 insertions(+) create mode 100644 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch diff --git a/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch new file mode 100644 index 0000000..e425475 --- /dev/null +++ b/0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch @@ -0,0 +1,39 @@ +From 3dc5722d5c7673a879f2b4680369d3ac8b6b64b6 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Wed, 4 Aug 2021 14:05:38 -0700 +Subject: [PATCH] cmake: Allow shared libraries to customize the soname using + LLVM_ABI_REVISION + +The LLVM_ABI_REVISION variable is intended to be used for release +candidates which introduce an ABI change to a shared library. This +variable can be specified per library, so there is not one global value +for all of LLVM. + +For example, if we LLVM X.0.0-rc2 introduces an ABI change for a library +compared with LLVM X.0.0-rc1, then the LLVM_ABI_REVISION number for +library will be incremented by 1. + +In the main branch, LLVM_ABI_REVISION should always be 0, it is only +meant to be used in the release branch. + +Differential Revision: https://reviews.llvm.org/D105594 +--- + clang/tools/clang-shlib/CMakeLists.txt | 5 +++++ + 3 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt +index 9c1f8ea452b3..4d785924e4bb 100644 +--- a/clang/tools/clang-shlib/CMakeLists.txt ++++ b/clang/tools/clang-shlib/CMakeLists.txt +@@ -1,3 +1,8 @@ ++# In the main branch, LLVM_ABI_REVISION should always be 0. In the release ++# branches, this should be incremented before each release candidate every ++# time the ABI of libclang-cpp.so changes. ++set(LLVM_ABI_REVISION 0) ++ + # Building libclang-cpp.so fails if LLVM_ENABLE_PIC=Off + if (NOT LLVM_ENABLE_PIC) + return() +-- +2.27.0 + diff --git a/clang.spec b/clang.spec index dd32292..99bf5f9 100644 --- a/clang.spec +++ b/clang.spec @@ -62,6 +62,7 @@ Patch0: 0001-PATCH-clang-Reorganize-gtest-integration.patch Patch1: 0003-PATCH-Make-funwind-tables-the-default-on-all-archs.patch Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch +Patch4: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch Patch6: 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch # Make clangBasic and clangDriver depend on LLVMTargetParser