about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/8/libunwind/gnu-install-dirs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/8/libunwind/gnu-install-dirs.patch')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libunwind/gnu-install-dirs.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libunwind/gnu-install-dirs.patch b/nixpkgs/pkgs/development/compilers/llvm/8/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..ffabba8137d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,28 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3d06073cfe74..55c7d1635fcd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,6 +18,8 @@ set(CMAKE_MODULE_PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+   project(libunwind)
+ 
++  include(GNUInstallDirs)
++
+   # Rely on llvm-config.
+   set(CONFIG_OUTPUT)
+   if(NOT LLVM_CONFIG_PATH)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f7523f88b6ac..4060dad214de 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -151,8 +151,8 @@ add_custom_target(unwind DEPENDS ${LIBUNWIND_BUILD_TARGETS})
+ 
+ if (LIBUNWIND_INSTALL_LIBRARY)
+   install(TARGETS ${LIBUNWIND_INSTALL_TARGETS}
+-    LIBRARY DESTINATION ${LIBUNWIND_INSTALL_PREFIX}lib${LIBUNWIND_LIBDIR_SUFFIX} COMPONENT unwind
+-    ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_PREFIX}lib${LIBUNWIND_LIBDIR_SUFFIX} COMPONENT unwind)
++    LIBRARY DESTINATION ${LIBUNWIND_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} COMPONENT unwind
++    ARCHIVE DESTINATION ${LIBUNWIND_INSTALL_PREFIX}${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} COMPONENT unwind)
+ endif()
+ 
+ if (NOT CMAKE_CONFIGURATION_TYPES AND LIBUNWIND_INSTALL_LIBRARY)