<div dir="ltr">I'm pretty hesitant to change this. We haven't really had any complaints and it makes several scenarios "just work". I'm sympathetic to your point, just not yet 100% convinced of what the change should be.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 29, 2014 at 9:18 PM, Russell Harmon <span dir="ltr"><<a href="mailto:eatnumber1@google.com" target="_blank">eatnumber1@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The behavior of automatically detecting libraries installed in the same prefix feels like magic to me anyway. Perhaps it would be better to have project-level variables for specifying the path to them individually? The default value for them could remain as origin/../lib which would keep from breaking things.<div class="HOEnZb">
<div class="h5"><br>
<br><div>On Thu May 29 2014 at 7:06:17 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">This looks like it would remove the origin/../lib RPATH which would break finding libraries related to Clang such as libc++?<div><br></div><div>It makes sense to add the GCC install prefix to the RPATH though. I wonder, should we try to do something about the lib vs. lib{32,64} business? I don't know that either of these does the right thing there.</div>


</div><div class="gmail_extra"><br><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Thu, May 29, 2014 at 3:37 PM, Russell Harmon <span dir="ltr"><<a href="mailto:eatnumber1@google.com" target="_blank">eatnumber1@google.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote">This way, an LLVM compiled after setting GCC_INSTALL_PREFIX will work correctly<br>


if you don't want to install LLVM into the GCC_INSTALL_PREFIX.<br>
---<br>
 CMakeLists.txt | 7 ++++++-<br>
 1 file changed, 6 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
index 9ec3e33..c85a028 100644<br>
--- a/CMakeLists.txt<br>
+++ b/CMakeLists.txt<br>
@@ -450,7 +450,12 @@ if (APPLE)<br>
   set(CMAKE_INSTALL_RPATH "@executable_path/../lib")<br>
 else(UNIX)<br>
   if(NOT DEFINED CMAKE_INSTALL_RPATH)<br>
-    set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")<br>
+    if(DEFINED GCC_INSTALL_PREFIX)<br>
+      set(CMAKE_INSTALL_RPATH "${GCC_INSTALL_PREFIX}/lib")<br>
+    else()<br>
+      set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")<br>
+    endif()<br>
+<br>
     if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)<br>
       set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin")<br>
     endif()<br>
</div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><span><font color="#888888">--<br>
1.9.1.423.g4596e3a<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</font></span></div></div></blockquote></blockquote>
</div></div></blockquote></div><br></div>