[cfe-dev] Clang and multilib search paths

Armin K. via cfe-dev cfe-dev at lists.llvm.org
Wed Jul 20 10:33:34 PDT 2016


Hi again,

This is a follow up from the previous thread.

When I use crtbegin.S and crtend.S for x86_64 from OpenBSD, and
place the assembled *.o files in /usr/lib/clang/3.9.0, I can
compile a 64 bit program, and it will use crtbegin.o and crtend.o
from /usr/lib/clang/3.9.0, which I can confirm by running clang
with -v.

However, this is also a multilib system. I have 32 bit clang
runtime in /usr/lib32/clang/3.9.0. If I assemble crtbegin.S and
crtend.S for i386, and place them in the mentioned dir, clang
won't pick them up. It tries to use ones from /usr/lib/clang/3.9.0
when compiling a test program with clang -m32.

Everything's okay and it picks up gcc's 32 bit files just fine. And,
of course, it works too when I explicitly use -B/usr/lib32/clang/3.9.0.

So, the question is:

How to make clang automatically search /usr/lib32/clang/3.9.0? or
Is there another directory the 32 bit files should be placed in?

Thanks in advance!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160720/40ee824f/attachment.sig>


More information about the cfe-dev mailing list