Re: [RFC] gcc lto&binutils: Load different gcc's bfd-plugin automatically

2019-03-05 Thread Joseph Myers
On Tue, 5 Mar 2019, Richard Biener wrote: > Well, why not go a step further and add a bfd-plugin note that suggests > the plugin to be used if it is installed? That could contain for example > lto_plugin_gcc8.so (to be installed in /lib/bfd-plugins/). Alternatively > a full path could be specifi

Re: [RFC] gcc lto&binutils: Load different gcc's bfd-plugin automatically

2019-03-05 Thread JunMa
在 2019/3/5 下午5:55, Richard Biener 写道: On Tue, Mar 5, 2019 at 10:41 AM JunMa wrote: Hi All We are now optimizing some projects with lto enabled, however, there are some issues. First, lto_plugin.so needs to be passed to ar/nm/ranlib. For example, build static library with lto: gcc -flto -O2

Re: [RFC] gcc lto&binutils: Load different gcc's bfd-plugin automatically

2019-03-05 Thread Richard Biener
On Tue, Mar 5, 2019 at 10:41 AM JunMa wrote: > > Hi All > > We are now optimizing some projects with lto enabled, however, > there are some issues. > First, lto_plugin.so needs to be passed to ar/nm/ranlib. > For example, build static library with lto: > > gcc -flto -O2 a.c -c -o a.o > gcc -flto -

[RFC] gcc lto&binutils: Load different gcc's bfd-plugin automatically

2019-03-05 Thread JunMa
Hi All We are now optimizing some projects with lto enabled, however, there are some issues. First, lto_plugin.so needs to be passed to ar/nm/ranlib. For example, build static library with lto: gcc -flto -O2 a.c -c -o a.o gcc -flto -O2 b.c -c -o b.o ar rcs --plugin=/path/to/lto_plugin.so   libx.