diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-09 16:53:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-09 16:53:27 +0000 |
commit | 80208fb578cf92cc308906660ca6d7860c6b2a1f (patch) | |
tree | 6f06818031b553c506fc10dfe9908a835df288aa /sys-devel/llvm/files | |
parent | 06a7b5647e11a8ddf69b1c3d3ded6a8ba28b923e (diff) |
gentoo resync : 09.03.2018
Diffstat (limited to 'sys-devel/llvm/files')
-rw-r--r-- | sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch b/sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch new file mode 100644 index 000000000000..5d1f042164ec --- /dev/null +++ b/sys-devel/llvm/files/6.0.9999/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch @@ -0,0 +1,38 @@ +From a7c94b20187a60cf1508ce882ee37b3a056eb0bd Mon Sep 17 00:00:00 2001 +From: Michal Gorny <mgorny@gentoo.org> +Date: Thu, 8 Mar 2018 15:09:38 +0000 +Subject: [PATCH] [cmake] Append -Wl,-rpath-link conditionally to GNULD + +Append -Wl,-rpath-link conditionally to whether GNU ld.bfd is used +rather than the Linux+!gold conditionals. Also move it out of 'else' +branch of *BSD handling. This fixes build failures with ld.bfd +on Gentoo/FreeBSD, and should cause no harm on other systems using +ld.bfd. + +This patch improves the original logic by reusing results of linker +detection introduced in r307852. + +Differential Revision: https://reviews.llvm.org/D43751 + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327007 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + cmake/modules/AddLLVM.cmake | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 20166d2cd30..95d47d00e51 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -1589,7 +1589,8 @@ function(llvm_setup_rpath name) + if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)") + set_property(TARGET ${name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,-z,origin ") +- elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT LLVM_LINKER_IS_GOLD) ++ endif() ++ if(LLVM_LINKER_IS_GNULD) + # $ORIGIN is not interpreted at link time by ld.bfd + set_property(TARGET ${name} APPEND_STRING PROPERTY + LINK_FLAGS " -Wl,-rpath-link,${LLVM_LIBRARY_OUTPUT_INTDIR} ") +-- +2.16.2 + |