This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Handle AR_NM_RANLIB_DEFAULT_PLUGIN environment variable

On Wed, Sep 19, 2012 at 3:23 AM, Markus Trippelsdorf
<> wrote:
> This patch introduces a new environment variable:
> It allows one to easily switch from one LTO plugin to another without
> the need to use wrappers (scripts, gcc-ar, etc.).
> (For example if one wants to build a project with clang using link time
> optimizations one simply points it to /usr/local/lib/
> If one wants to use gcc with slim LTO on simply points it to e.g.:
> /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0/
> An explicit "--plugin" command line switch overrides the environment
> variable (so that existing wrappers keep functioning).
> If this looks acceptable it would be nice if someone could commit this,
> because I don't have access.
> Thanks.
> 2012-09-19  Markus Trippelsdorf  <>
> binutils/
>         * ar.c (decode_options): Handle AR_NM_RANLIB_DEFAULT_PLUGIN
>         environment variable.
>         (ranlib_main): Likewise.
>         * nm.c (main): Likewise.

I would prefer to add automatic plugin support to binutils:

1. Figure out gcc driver name and the plugin DSO name at configure time.
2. If --plugin is used without DSO name, call

popen ($gcc-driver -print-prog-name=$DSO)

to get plugin DSO path.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]