<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 5, 2013 at 6:31 PM, Bob Wilson <span dir="ltr"><<a href="mailto:bob.wilson@apple.com" target="_blank">bob.wilson@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Nov 4, 2013, at 6:37 PM, Rafael Espíndola <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
<br>
> On 4 November 2013 18:27, Benjamin Scarlet <<a href="mailto:flld0@greynode.net">flld0@greynode.net</a>> wrote:<br>
>> I would have thought that the proper solution would be to link the linker with an appropriate rpath. After my change, responsibility for specifying the path to the library moves from the library to the executable - thus enabling it to be different for different executables. If the linker is to be rebuilt, it needs to have "-rpath @executable_path/../lib" or such passed to the linker when linking the new linker. (If the linker to link the new linker is invoked by a compiler driver like clang or gcc, then that probably means you need to put a "-Wl," before each of those flags to get them passed through to the linker, so "-Wl,-rpath -Wl,@executable_path/../lib".). There's an example of this on line 622 of the Makefile.rules in the root directory of the llvm source.<br>

>><br>
>> To answer your direct question, I'm not using libLTO.dylib at all, so reverting my change there wouldn't directly cause me any trouble. I do think it'd be a step backward in general, though.<br>
>><br>
>> Is the code for the linker that's using libLTO.dylib in the llvm tree somewhere I missed in in my patch, or is it outside the llvm tree?<br>
><br>
> I think it is this one:<br>
><br>
> <a href="http://www.opensource.apple.com/source/ld64/" target="_blank">http://www.opensource.apple.com/source/ld64/</a><br>
<br>
</div>Right.  We could change ld64 to link with a -rpath option, but we don't publicly release new versions of ld64 very often.  It would be quite a while before anyone could get a copy of ld64 that works with trunk llvm.  It would also mean that you couldn't freely mix and match old and new versions of ld64 vs. llvm.  If there's a good reason to make that change, I think we can do it, but I'm not convinced it is worth the trouble.<br>

<br>
Does anyone object if we keep most of Benjamin's patch and revert just the part for libLTO.dylib?<br></blockquote><div><br></div><div>No objection, I mean, it's better if you start using rpath with ld64 etc, but it's also nice if darwin works so... :)</div>
<div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>