<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 01/30/2017 09:09 AM, Hahnfeld, Jonas
      via cfe-dev wrote:<br>
    </div>
    <blockquote
      cite="mid:05accfb1a7c04af5b0cee620e8322e88@rwthex-w2-a.rwth-ad.de"
      type="cite">
      <pre wrap="">Hi,

Background: I'm on CentOS 7 which has GCC 4.8 installed in /usr/bin and I'm
installing Clang to, let's say, /opt/clang. (I'm doing so with
CLANG_DEFAULT_CXX_STDLIB=libc++, just if you wonder why the following
matters to me...)
With the current behavior, -lunwind passed to Clang will pull in the system
default non-GNU /usr/lib/libunwind.so.8. IMO it should take LLVM's version
in /opt/clang/lib/libunwind.so.1

That's why I would like to change the default order for searching libraries
in Clang. Currently (and most probably due to historical reasons), the
Driver adds paths next to GCC first.
I propose to prefer paths next to the installed Clang. You can find the
patch doing the change here: <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/D26244">https://reviews.llvm.org/D26244</a>

However, this has a potential impact as Chandler pointed out in above patch
if Clang is installed to /opt/software together with other software.
With my proposed change, Clang will link against
/opt/software/lib/libunrelated.so when passed -lunrelated whereas before it
had preferred /usr/lib/libunrelated.so (assuming that the library exists in
both places).
Is that considered an important scenario or can we expect our users to
install Clang separately?

Any other feedback on that topic?</pre>
    </blockquote>
    <br>
    I think this is an important usage scenario, but because of the
    complication Chandler mentioned, I don't think we can enable it by
    default. I think it is very reasonable to have some CMake flag that
    enables this behavior.<br>
    <br>
     -Hal<br>
    <br>
    <blockquote
      cite="mid:05accfb1a7c04af5b0cee620e8322e88@rwthex-w2-a.rwth-ad.de"
      type="cite">
      <pre wrap="">
Jonas

--
Jonas Hahnfeld, MATSE-Auszubildender

IT Center
Group: High Performance Computing
Division: Computational Science and Engineering
RWTH Aachen University
Seffenter Weg 23
D 52074  Aachen (Germany)
<a class="moz-txt-link-abbreviated" href="mailto:Hahnfeld@itc.rwth-aachen.de">Hahnfeld@itc.rwth-aachen.de</a>
<a class="moz-txt-link-abbreviated" href="http://www.itc.rwth-aachen.de">www.itc.rwth-aachen.de</a>


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </body>
</html>