Accepting request 1224730 from devel:tools:compiler
- Apply clang-shlib-symbol-versioning.patch to add symbol versions to libclang-cpp.so similar to libLLVM.so. This is required when multiple versions of the library are loaded into the same process. (boo#1219405, boo#1221183, boo#1233220) OBS-URL: https://build.opensuse.org/request/show/1224730 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/llvm13?expand=0&rev=23
This commit is contained in:
commit
db824f35f7
26
clang-shlib-symbol-versioning.patch
Normal file
26
clang-shlib-symbol-versioning.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
|
||||||
|
index aa7fcd1efed4..054c7d59ec34 100644
|
||||||
|
--- a/clang/tools/clang-shlib/CMakeLists.txt
|
||||||
|
+++ b/clang/tools/clang-shlib/CMakeLists.txt
|
||||||
|
@@ -48,6 +48,14 @@ add_clang_library(clang-cpp
|
||||||
|
${_OBJECTS}
|
||||||
|
LINK_LIBS
|
||||||
|
${_DEPS})
|
||||||
|
+
|
||||||
|
+configure_file(simple_version_script.map.in simple_version_script.map)
|
||||||
|
+
|
||||||
|
+if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW)
|
||||||
|
+ # Solaris ld does not accept global: *; so there is no way to version *all* global symbols
|
||||||
|
+ target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
# Optimize function calls for default visibility definitions to avoid PLT and
|
||||||
|
# reduce dynamic relocations.
|
||||||
|
if (NOT APPLE AND NOT MINGW)
|
||||||
|
diff --git a/clang/tools/clang-shlib/simple_version_script.map.in b/clang/tools/clang-shlib/simple_version_script.map.in
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..cb2306d1f596
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/clang/tools/clang-shlib/simple_version_script.map.in
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+@LLVM_SHLIB_SYMBOL_VERSION@ { global: *; };
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Nov 16 22:38:02 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Apply clang-shlib-symbol-versioning.patch to add symbol versions
|
||||||
|
to libclang-cpp.so similar to libLLVM.so. This is required when
|
||||||
|
multiple versions of the library are loaded into the same
|
||||||
|
process. (boo#1219405, boo#1221183, boo#1233220)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 20 21:20:37 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
Tue Aug 20 21:20:37 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
@ -168,6 +168,8 @@ Patch33: CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch
|
|||||||
Patch35: llvm-update-extract-section-script.patch
|
Patch35: llvm-update-extract-section-script.patch
|
||||||
# Fix build with Swig 4.1.0: backport of upstream commits 81fc5f7909a4, f0a25fe0b746. (gh#llvm/llvm-project#58018)
|
# Fix build with Swig 4.1.0: backport of upstream commits 81fc5f7909a4, f0a25fe0b746. (gh#llvm/llvm-project#58018)
|
||||||
Patch38: lldb-swig-4.1.0-build-fix.patch
|
Patch38: lldb-swig-4.1.0-build-fix.patch
|
||||||
|
# PATCH-FIX-UPSTREAM: Use symbol versioning also for libclang-cpp.so.
|
||||||
|
Patch39: clang-shlib-symbol-versioning.patch
|
||||||
BuildRequires: binutils-devel >= 2.21.90
|
BuildRequires: binutils-devel >= 2.21.90
|
||||||
BuildRequires: cmake >= 3.13.4
|
BuildRequires: cmake >= 3.13.4
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -613,6 +615,7 @@ pushd clang-%{_version}.src
|
|||||||
%patch -P 4 -p1
|
%patch -P 4 -p1
|
||||||
%patch -P 6 -p1
|
%patch -P 6 -p1
|
||||||
%patch -P 9 -p2
|
%patch -P 9 -p2
|
||||||
|
%patch -P 39 -p2
|
||||||
|
|
||||||
# We hardcode openSUSE
|
# We hardcode openSUSE
|
||||||
rm unittests/Driver/DistroTest.cpp
|
rm unittests/Driver/DistroTest.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user