* lto + pgo + shared libraries : explanation ?
@ 2014-07-26 9:39 Alain Meunier
0 siblings, 0 replies; only message in thread
From: Alain Meunier @ 2014-07-26 9:39 UTC (permalink / raw)
To: gcc-help
Hello,
gcc 4.8.2
I just happen to be in need to use pgo,lto with shared libraries that I want to link.
I cannot figure out if lto will bring some efficiency to the links.
1) gcc -march=native -03 -shared -fPIC first_shared.c -flto -o libfoo.so
2) gcc -march=native -03 -shared -fPIC second_shared.c -flto -o libbar.so
3) gcc -march=native -03 main.c -lfoo -lbar -flto
Ok all my functions are static except some of them (public interface) inside the shared library.
What should I do exactly to take advantage of lto with shared libraries ?
Now, what does it take to create PGO on shared libraries ?
I know I can use fprofile-generate/fprofile-use on 3) but will it be enough to take 1) and 2) into account ?
I am a bit lost on what to do here in this context.
All the commands work fine but is it doing anything ?
Thanks
Alain
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-26 9:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-26 9:39 lto + pgo + shared libraries : explanation ? Alain Meunier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).