[cfe-commits] r140604 - /cfe/trunk/lib/Driver/ToolChains.cpp

Chandler Carruth chandlerc at google.com
Sat Oct 1 04:06:32 CDT 2011


On Sat, Oct 1, 2011 at 1:03 AM, David Chisnall <csdavec at swan.ac.uk> wrote:

> As the commit message implies, it was making -B work for paths that are
> provided to ld under Linux.  A lot of cross-compile toolchains put things
> like crtbegin.o in an SDK-specific location.  With this applied, it was
> possible to just add -B/path/to/sdk to the clang flags and have things work.
>

For reference, I'm currently working on making --sysroot work for linker
flags passed through ld, based on how GCC manages them. I'm not familiar at
all with '-B's behavior, as it isn't used by the cross-compiling GCC
toolchain I work with, and it was indicated to have design problems.

That said, if you need to implement support for '-B' behavior, please do so.
One good way to clarify its intent is to include test cases for exactly what
you expect the effect to be on the driver.

If this has been reverted, then please can someone implement the same
> feature in a better way?  Without it, I will no longer be able to
> cross-compile targeting ARM/Linux...


If you have a use case, I think you're the best person to implement it.
Please work up a patch that has both test cases covering the features you
want, and that doesn't break existing test cases (I added one to cover the
regression that your original patch caused), and mail it to the list.

I do think something like this should get some review, as I've heard
concerns and objections to furthering Clang's support for the '-B' option in
the past, as it seemed poorly designed in GCC.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.uiuc.edu/pipermail/cfe-commits/attachments/20111001/063851df/attachment.html 


More information about the cfe-commits mailing list