[arch-commits] Commit in llvm/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Tue Aug 7 23:35:46 UTC 2018


    Date: Tuesday, August 7, 2018 @ 23:35:46
  Author: foutrelis
Revision: 331141

upgpkg: llvm 6.0.1-3

Try to adapt to binutils calling dlclose() on LLVMgold.so.

Added:
  llvm/trunk/D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch
Modified:
  llvm/trunk/PKGBUILD

-------------------------------------------------------------------+
 D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch |   28 ++++++++++
 PKGBUILD                                                          |    8 ++
 2 files changed, 35 insertions(+), 1 deletion(-)

Added: D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch
===================================================================
--- D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch	                        (rev 0)
+++ D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch	2018-08-07 23:35:46 UTC (rev 331141)
@@ -0,0 +1,28 @@
+From 4961e6f4874713052bc0b777742268b89929a356 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Wed, 8 Aug 2018 01:40:26 +0300
+Subject: [PATCH] [cmake] Prevent LLVMgold.so from being unloaded on Linux
+
+Extend the fix from D40459 to also apply to modules such as the LLVM
+gold plugin. This is needed because current binutils master (and future
+binutils 2.32) calls dlclose() on bfd plugins as part of a recent fix
+for PR23460 (https://sourceware.org/bugzilla/show_bug.cgi?id=23460).
+---
+ cmake/modules/HandleLLVMOptions.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
+index 5fd318f0..05cf9026 100644
+--- a/cmake/modules/HandleLLVMOptions.cmake
++++ b/cmake/modules/HandleLLVMOptions.cmake
+@@ -149,6 +149,7 @@ endif()
+ # is unloaded.
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete")
++  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,nodelete")
+ endif()
+ 
+ 
+-- 
+2.18.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-07 23:18:31 UTC (rev 331140)
+++ PKGBUILD	2018-08-07 23:35:46 UTC (rev 331141)
@@ -4,7 +4,7 @@
 
 pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
 pkgver=6.0.1
-pkgrel=2
+pkgrel=3
 _ocaml_ver=4.06.0
 arch=('x86_64')
 url="https://llvm.org/"
@@ -15,11 +15,13 @@
 source=(https://releases.llvm.org/$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
         D44391-export-LLVM_DYLIB_COMPONENTS-in-LLVMConfig.cmake.patch
         D44420-cmake-fix-a-typo-in-llvm_config-macro.patch
+        D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch
         llvm-config.h)
 sha256sums=('b6d6c324f9c71494c0ccaf3dac1f16236d970002b42bb24a6c9e1634f7d0f4e2'
             'SKIP'
             '96e2f3ca8b7d1bdbe2606a1eebb12c57b39838d1bcc15e40388e8d59649a9f4a'
             '5cc114fd711e6ea836a6270b2f713e2e751c49e8b5ffa6c6812127ca801acef3'
+            '4be3c981e1eac0e3d9cbfd98f2763ff8f72f7636d1cb8dca599c8c5d824d1fbb'
             '597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
 validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans at chromium.org>
 validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar at redhat.com>
@@ -33,6 +35,10 @@
 
   # https://reviews.llvm.org/D44420
   patch -Np0 -i ../D44420-cmake-fix-a-typo-in-llvm_config-macro.patch
+
+  # https://reviews.llvm.org/D50416
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=23460#c10
+  patch -Np1 -i ../D50416-cmake-Prevent-LLVMgold.so-from-being-unloaded-on-Lin.patch
 }
 
 build() {



More information about the arch-commits mailing list