[cfe-dev] [RFC] Prefer libraries installed next to Clang over those from GCC
Hahnfeld, Jonas via cfe-dev
cfe-dev at lists.llvm.org
Mon Jan 30 07:09:46 PST 2017
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: https://reviews.llvm.org/D26244
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?
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)
Hahnfeld at itc.rwth-aachen.de
www.itc.rwth-aachen.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170130/8de7e003/attachment.bin>
More information about the cfe-dev
mailing list