On 27 February 2014 10:51, Brad King <[email protected]> wrote:
> On 02/27/2014 10:47 AM, Rafael Espíndola wrote:
>> The attached patch should fix both issues.
>
> Perhaps -zorigin should be used only when we are using $ORIGIN?
>
>   if(NOT DEFINED CMAKE_INSTALL_RPATH)
>     set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
>     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-zorigin")
>   endif()
>
> If a user sets CMAKE_INSTALL_RPATH to include $ORIGIN then he/she
> can also add -zorigin as necessary.

True. My thinking was that there is probably no reason not to have it,
but the fact that it is not implicit in freebsd probably means there
is a reason for not having it sometimes.

Cheers,
Rafael
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72901c8..6128db8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -447,6 +447,7 @@ if (APPLE)
   set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
 else(UNIX)
   if(NOT DEFINED CMAKE_INSTALL_RPATH)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-zorigin")
     set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
   endif(NOT DEFINED CMAKE_INSTALL_RPATH)
 endif()
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to