[patch][Driver] -Bprefix option

Iain Sandoe iain at codesourcery.com
Fri Dec 13 11:54:25 PST 2013


Hi!
On 13 Dec 2013, at 19:12, Joerg Sonnenberger wrote:

> On Fri, Dec 13, 2013 at 01:43:02PM -0500, David Fang wrote:
>> 	The attached patch adds help-text to clang -B, and also forwards -B
>> to gcc in the Driver, which allows use of newer linker tools.
> 
> I don't think the help text is correct -- the path is also used for
> other files like crt[01].o IIRC? Forwarding it to GCC is OK.

It has wider implications …

-Bprefix
This option specifies where to find the executables, libraries, include files, and data files of the compiler itself.

[this can include spec files that determine how/where to locate dependent libs]

I guess using it might have unexpected behaviour, depending on what one is trying to achieve.

Having said that, it's function is already present in GCC - and it's already exposed - this is just documenting things.

>> 1) Should I do the same for the assembler? (commented out in patch)
> 
> No, I don't think it will generally be supported by it.

<0.02GBP>
it would be much more transparent (and probably useful during porting new platforms) to have 
--with-as= and --with-ld= 
as overrides.
</0.02GBP>

Iain





More information about the cfe-commits mailing list