llvm18/llvm-normally-versioned-libllvm.patch
Aaron Puchert ef8f01691b Accepting request 1225866 from home:dirkmueller:Factory
- add libcxx-use-shlex-quote.patch to fix build with python 3.13

- Use correct LLVM_HOST_TRIPLE for riscv64
- Rebase llvm-do-not-install-static-libraries.patch.
- Add upstream patch to export compiler-rt FuzzedDataProvider header,
  * compiler-rt-move-fdp.patch
- Drop llvm5-devel-static. llvm5-devel contains shared library with
- Package libLLVMFuzzer
- Use gcc6 on SLE12
- Package license & credits
  * See
- Enable BPF for all arches bsc#1026191
- libc++ must depend on libc++abi
- Disable libcxx/lldb/openmp for SLE fate#319582
- Update rpmlintrc to whitelist libLTO.so
- Re-enable glibc-2.23 patch for Tumbleweed
- Add glibc-2.23-libcxx.patch to fix test failures with glibc 2.23
-  Remove FFI support because its fragile
- Enable OpenMP for x86, x86_64, ppc64 and ppc64le
- Enable all targets on x86, x86_64
- fix build on s390x (one typo in ifarch and one change in filelist)
- Add llvm-fix-parsearmarch.patch to fix parsing armv{6,7}hl archs.
- Rename llvm-remove-werror-date-time.patch to
- Require llvm-clang not just clang
- Add libcxxabi-exceptions.patch to fix libcxxabi exception handling
- Remove asan-disable-hugemalloctest.patch and
- build compiler-rt on ppc64 (don't delete it)
- complete ifarchs for s390
- Remove non-existing doc subpackage
- Update to r196371 from release_34 branch

OBS-URL: https://build.opensuse.org/request/show/1225866
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm18?expand=0&rev=35
2024-12-03 23:47:11 +00:00

67 lines
3.0 KiB
Diff

Before llvm4, both major and minor version updates of llvm were regularly
breaking API. Because of that, the libLLVM library was named in following
format: libLLVM-${major}-${minor}.so
(https://bugs.llvm.org/show_bug.cgi?id=25059)
(https://reviews.llvm.org/D13841)
The package containing this library was called libLLVM${major}_${minor} which
follows our guidelines.
Since llvm4, llvm decided to follow semantic versioning and only break API if
the major version was increased. In addition they do not intend to ever have
minor version other than 0.
(http://blog.llvm.org/2016/12/llvms-new-versioning-scheme.html)
The package was renamed to libLLVM${major}, which no longer follows the naming
guidelines, but since the package contained multiple libraries, it was not
detected.
Since bnc#1049703 the libLLVM${major} package contains only the
libLLVM-${major}-${minor}.so library and no others. This triggers the
shlib-policy-name-error check in our packaging system.
Because the reasons for using the libLLVM-${major}-${minor}.so format are no
longer valid, lets revert back to libLLVM.so.${major}.${minor}.${version}
format. That way the package name matches our guidelines.
With llvm18, the minor version is now always 1 for releases, and upstream
decided to rename the library to libLLVM.so.${major}.${minor}, but keep the
old name as symbolic link for backwards compatibility. That is of course
not relevant for us.
Index: llvm-8.0.0rc3.src/tools/llvm-config/llvm-config.cpp
===================================================================
--- llvm-8.0.0rc3.src.orig/tools/llvm-config/llvm-config.cpp
+++ llvm-8.0.0rc3.src/tools/llvm-config/llvm-config.cpp
@@ -380,7 +380,6 @@ int main(int argc, char **argv) {
} else {
// default to the unix values:
SharedExt = "so";
- SharedVersionedExt = LLVM_DYLIB_VERSION ".so";
StaticExt = "a";
StaticDir = SharedDir = ActiveLibDir;
StaticPrefix = SharedPrefix = "lib";
@@ -393,7 +392,7 @@ int main(int argc, char **argv) {
bool DyLibExists = false;
const std::string DyLibName =
- (SharedPrefix + "LLVM-" + SharedVersionedExt).str();
+ (SharedPrefix + "LLVM." + SharedExt).str();
// If LLVM_LINK_DYLIB is ON, the single shared library will be returned
// for "--libs", etc, if they exist. This behaviour can be overridden with
Index: llvm-18.1.2.src/tools/llvm-shlib/CMakeLists.txt
===================================================================
--- llvm-18.1.2.src.orig/tools/llvm-shlib/CMakeLists.txt
+++ llvm-18.1.2.src/tools/llvm-shlib/CMakeLists.txt
@@ -37,8 +37,6 @@ if (WIN32)
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES})
else()
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB OUTPUT_NAME LLVM ${INSTALL_WITH_TOOLCHAIN} ${SOURCES})
- # Add symlink for backwards compatibility with old library name
- llvm_install_library_symlink(LLVM-${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX} $<TARGET_FILE_NAME:LLVM> SHARED FULL_DEST COMPONENT LLVM)
endif()
list(REMOVE_DUPLICATES LIB_NAMES)