[llvm] r203419 - Work around FreeBSD rtld rpath $ORIGIN limitation
Ed Maste
emaste at freebsd.org
Sun Mar 9 11:48:46 PDT 2014
Author: emaste
Date: Sun Mar 9 13:48:45 2014
New Revision: 203419
URL: http://llvm.org/viewvc/llvm-project?rev=203419&view=rev
Log:
Work around FreeBSD rtld rpath $ORIGIN limitation
FreeBSD's rtld requires the DF_ORIGIN flag set in order to process
$ORIGIN in rpath.
FreeBSD bug http://bugs.freebsd.org/187114
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=203419&r1=203418&r2=203419&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Sun Mar 9 13:48:45 2014
@@ -445,6 +445,9 @@ if (APPLE)
else(UNIX)
if(NOT DEFINED CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
+ if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin")
+ endif()
endif(NOT DEFINED CMAKE_INSTALL_RPATH)
endif()
More information about the llvm-commits
mailing list