[RFA] patch to allow enabling linker --build-id for all links.

Ian Lance Taylor iant@google.com
Fri Apr 24 21:13:00 GMT 2009


Paul Pluzhnikov <ppluzhnikov@google.com> writes:

> On Wed, Apr 1, 2009 at 11:41 AM, Roland McGrath <roland@redhat.com> wrote:
>> Looks good to me!
>
> Thanks. Attached is a revised patch.
>
> I do not have commit to GCC (but Google has blanket copyright assignment
> to FSF). If this patch is ok, could approver please commit it for me?
>
> Thanks,

> 2009-04-01  Paul Pluzhnikov  <ppluzhnikov@google.com>
>            Roland McGrath <roland@redhat.com>
> 
>            * configure.ac (HAVE_LD_BUILDID): New check for ld --build-id
>            support.
>            (ENABLE_LD_BUILDID): New configuration option.
>            * gcc.c [HAVE_LD_BUILDID and ENABLE_LD_BUILDID]
>            (LINK_BUILDID_SPEC): New macro.
>            (init_spec): If defined, prepend it between LINK_EH_SPEC
> and link_spec.
> 	   * doc/install.texi: Document --enable-linker-build-id option.

This is OK.

> +@item --enable-linker-build-id
> +Tells GCC to pass @option{--build-id} option to the linker for all final
> +links (links performed without the @option{-r} or @option{--relocatable}
> +option), if the linker supports it.  A warning is issued and the option
> +is ignored, if you specify @option{--enable-linker-build-id}, but your
> +linker does not support @option{--build-id} option.  The default is off.

I think the last sentence would be clearer if the clauses were reversed:

    If you specify @option{--enable-linker-build-id}, but your linker
    does not support @option{--build-id} option, a warning is issued and
    the @option{--enable-linker-build-id} option is ignored.


Thanks.

Ian



More information about the Gcc-patches mailing list