<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Hal,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for the idea: I will adapt the patch to introduce a new CMake flag and to not change the default behavior.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jonas<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Hal Finkel [mailto:hfinkel@anl.gov] <br><b>Sent:</b> Monday, January 30, 2017 5:58 PM<br><b>To:</b> Hahnfeld, Jonas; cfe-dev@lists.llvm.org<br><b>Subject:</b> Re: [cfe-dev] [RFC] Prefer libraries installed next to Clang over those from GCC<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p><o:p> </o:p></p><div><p class=MsoNormal>On 01/30/2017 09:09 AM, Hahnfeld, Jonas via cfe-dev wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>Hi,<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Background: I'm on CentOS 7 which has GCC 4.8 installed in /usr/bin and I'm<o:p></o:p></pre><pre>installing Clang to, let's say, /opt/clang. (I'm doing so with<o:p></o:p></pre><pre>CLANG_DEFAULT_CXX_STDLIB=libc++, just if you wonder why the following<o:p></o:p></pre><pre>matters to me...)<o:p></o:p></pre><pre>With the current behavior, -lunwind passed to Clang will pull in the system<o:p></o:p></pre><pre>default non-GNU /usr/lib/libunwind.so.8. IMO it should take LLVM's version<o:p></o:p></pre><pre>in /opt/clang/lib/libunwind.so.1<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>That's why I would like to change the default order for searching libraries<o:p></o:p></pre><pre>in Clang. Currently (and most probably due to historical reasons), the<o:p></o:p></pre><pre>Driver adds paths next to GCC first.<o:p></o:p></pre><pre>I propose to prefer paths next to the installed Clang. You can find the<o:p></o:p></pre><pre>patch doing the change here: <a href="https://reviews.llvm.org/D26244">https://reviews.llvm.org/D26244</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre>However, this has a potential impact as Chandler pointed out in above patch<o:p></o:p></pre><pre>if Clang is installed to /opt/software together with other software.<o:p></o:p></pre><pre>With my proposed change, Clang will link against<o:p></o:p></pre><pre>/opt/software/lib/libunrelated.so when passed -lunrelated whereas before it<o:p></o:p></pre><pre>had preferred /usr/lib/libunrelated.so (assuming that the library exists in<o:p></o:p></pre><pre>both places).<o:p></o:p></pre><pre>Is that considered an important scenario or can we expect our users to<o:p></o:p></pre><pre>install Clang separately?<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Any other feedback on that topic?<o:p></o:p></pre></blockquote><p class=MsoNormal><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><br><o:p></o:p></p><pre><o:p> </o:p></pre><pre>Jonas<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>--<o:p></o:p></pre><pre>Jonas Hahnfeld, MATSE-Auszubildender<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>IT Center<o:p></o:p></pre><pre>Group: High Performance Computing<o:p></o:p></pre><pre>Division: Computational Science and Engineering<o:p></o:p></pre><pre>RWTH Aachen University<o:p></o:p></pre><pre>Seffenter Weg 23<o:p></o:p></pre><pre>D 52074  Aachen (Germany)<o:p></o:p></pre><pre><a href="mailto:Hahnfeld@itc.rwth-aachen.de">Hahnfeld@itc.rwth-aachen.de</a><o:p></o:p></pre><pre><a href="http://www.itc.rwth-aachen.de">www.itc.rwth-aachen.de</a><o:p></o:p></pre><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><p class=MsoNormal><br><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>cfe-dev mailing list<o:p></o:p></pre><pre><a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><o:p></o:p></pre><pre><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><o:p></o:p></pre><p class=MsoNormal><br><br><o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Hal Finkel<o:p></o:p></pre><pre>Lead, Compiler Technology and Programming Languages<o:p></o:p></pre><pre>Leadership Computing Facility<o:p></o:p></pre><pre>Argonne National Laboratory<o:p></o:p></pre></div></div></body></html>