[cfe-dev] Changing the way Clang's driver computes the library search paths on Linux

Chandler Carruth chandlerc at google.com
Sun Oct 2 11:09:04 PDT 2011


On Sun, Oct 2, 2011 at 11:05 AM, David Chisnall <csdavec at swan.ac.uk> wrote:

> It is, at least, no more broken than it was before.  However, there still
> appears to be no way of specifying the location of crt*.o, and since
> reverting my patch it no longer respects -B, so cross-compilation toolchains
> that target Linux are back in the not-working category.
>

If you have a system root with a '/lib/crt*.o' (or a /usr/lib/crt*.o) in it,
then I believe --sysroot will work. If it doesn't I will fix it until it
does. That's because this is the cross-compiling environment I'm working
with. I'm not sure its there yet, but I do plan to make sysroot work.

Why sysroot rather than -B? Because sysroot seems much more principled in
its behavior, and because the previous toolchain I was working with heavily
was a GCC one that used sysroot heavily. It's only use of -B was to locate
auxillary *binaries* to run during the build, which I believe Clang
supports.

I'm still happy for you to propose patches using -B, but they need to not
break existing use cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111002/23771519/attachment.html>


More information about the cfe-dev mailing list