summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/hsa-rocr-dev/0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch
blob: 6b73f81635a5c8292e1b7967a579fdd756b7c979 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 905b812fffdf109f767e1dc079ac1d32d5cf5838 Mon Sep 17 00:00:00 2001
From: Harmen Stoppels <harmenstoppels@gmail.com>
Date: Wed, 5 Aug 2020 17:44:05 +0200
Subject: [PATCH] Do not set an explicit rpath by default, since package
 managers cannot override them

---
 src/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7174044..10c6fcc 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -114,7 +114,9 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR}/libamdhsacode )
 add_definitions ( -DROCR_BUILD_ID=${PACKAGE_VERSION_STRING} )
 
 ## Set RUNPATH - ../../lib covers use of the legacy symlink in /hsa/lib/
-set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64")
+if (NOT CMAKE_INSTALL_RPATH)
+  set(CMAKE_INSTALL_RPATH "$ORIGIN;$ORIGIN/../../lib;$ORIGIN/../../lib64;$ORIGIN/../lib64")
+endif ()
 
 ## ------------------------- Linux Compiler and Linker options -------------------------
 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -fexceptions -fno-rtti -fvisibility=hidden -Wno-error=sign-compare -Wno-sign-compare -Wno-write-strings -Wno-conversion-null -fno-math-errno -fno-threadsafe-statics -fmerge-all-constants -fms-extensions -Wno-error=comment -Wno-comment -Wno-error=pointer-arith -Wno-pointer-arith -Wno-error=unused-variable -Wno-error=unused-function" )
-- 
2.25.1