[LLVMbugs] [Bug 23877] New: `clang -print-file-name` doesn't respect LIBRARY_PATH
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jun 17 13:13:42 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23877
Bug ID: 23877
Summary: `clang -print-file-name` doesn't respect LIBRARY_PATH
Product: clang
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: jvp4846 at g.rit.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Unlike GCC, clang ignores LIBRARY_PATH when looking up a library via
`-print-file-name`, but it *does* consult LIBRARY_PATH when actually linking:
jim at huginn ~
$ LIBRARY_PATH=$HOME/lib gcc -print-file-name=libboost_iostreams.so
/home/jim/lib/../lib/libboost_iostreams.so
jim at huginn ~
$ LIBRARY_PATH=$HOME/lib clang-3.6 -print-file-name=libboost_iostreams.so
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.1.0/../../../x86_64-linux-gnu/libboost_iostreams.so
jim at huginn ~
$ LIBRARY_PATH=$HOME/lib clang-3.6 -shared -olibfoo.so -lboost_iostreams
jim at huginn ~
$ ldd libfoo.so
linux-vdso.so.1 => (0x00007fff5c5fe000)
libboost_iostreams.so.1.55.0 =>
/home/jim/lib/libboost_iostreams.so.1.55.0 (0x00007f2d2cb3f000)
...
jim at huginn ~
$ clang-3.6 --version
Ubuntu clang version 3.6.2-svn239700-1~exp1 (branches/release_36) (based on
LLVM 3.6.2)
Target: x86_64-pc-linux-gnu
Thread model: posix
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150617/a3cd1f94/attachment.html>
More information about the llvm-bugs
mailing list