http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #105 from Markus Trippelsdorf <markus at trippelsdorf dot de> 
2011-06-18 10:18:09 UTC ---
(In reply to comment #104)
> > Even with 8c1fce46fc0 reverted libxul fails to link during
> > a profiledbuild. Normal build is fine.
> 
> I didn't really tested profiledbuild for a while, so I will check.
> Last time I tried we was able to build libxul but still had problems
> building one of later libraries because of the COMDAT issues. I filled
> Mozilla PR for that (the problem really is including some classes but not
> linking with their implementation).
> 
> What worked well for me is to profile w/o LTO and LTO final build.  This is
> recommended way anyway as LTO -fprofile-generae build is unnecesarily
> expensive.

Yes, that how I run things normally. too.

> What is the official way of building mozilla with FDO?

(Here is what I use:)

make -f client.mk profiledbuild

with the following appended to your .mozconfig:
ac_add_options --enable-profile-guided-optimization
mk_add_options PROFILE_GEN_SCRIPT=/home/markus/run-firefox.sh

~ % cat run-firefox.sh
#!/bin/sh
export NO_EM_RESTART=1
sudo -u markus $OBJDIR/dist/bin/firefox -no-remote

This will start the instrumented firefox. Use it for some time. After 
you close it, the final -fprofile-use build starts.

> Does the non-FDO problem persist for you?  The Jul 10 commit was part of
> longer series of alias rewrite and I fixed some of fallout afterwards (and
> was able to build mozilla).  Didn't see the particular problem you report
> however.

I only see the problems during a FDO build, non-FDO is fine.
(But because it turned out that both issues have nothing to do with LTO maybe
it would be better to file a new bug for them?)

Reply via email to