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

[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.