Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451776 - app-office/libreoffice - add USE=lto
Summary: app-office/libreoffice - add USE=lto
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Low enhancement with 1 vote (vote)
Assignee: Gentoo Office Team
Depends on:
Reported: 2013-01-13 14:46 UTC by Ray Griffin (rorgoroth)
Modified: 2013-03-25 16:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Ray Griffin (rorgoroth) 2013-01-13 14:46:08 UTC
Hello, I am aware that lto bugs are not supported but I would like to request a (masked) use flag for link-time optimization in Libreoffice.

According to the LO mailing list[1] lto support was/began_to_be added in August of 2011, and was working with lto even on gcc 4.5. 
Configure requires "--enable-lto" and atm this requires an environment set up for libreoffice consisting of EXTRA_ECONF="--enable-lto" as I described here[2].


Reproducible: Always

Steps to Reproduce:
2. emerge libreoffice
Actual Results:  
checking whether to use link-time optimization... no

Followed by build failing early on in the build.

Expected Results:  
checking whether to use link-time optimization... yes

checking whether to use link-time optimization... yes

Is achieved when EXTRA_ECONF="--enable-lto" is in place.
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2013-03-06 21:37:00 UTC
with -lto and -mergedlib you get to 6gb of mem consumed during buildtime, is such behaviour ever desired?

I would say it is best to be kept to the EXTRA_ECONF variable which is designed specially for this purpose.

Also you don't have to export this prior build, you can create file

/etc/portage/env/tlo.conf which contains the line and ldflags/cflags settings and then just add linke like this to /etc/portage/package.env
app-office/libreoffice lto.conf

Let me know if such solution is enough for you or not (as I would rather close this bug as wontfix until the lto matures enough to be viable option everywhere :-)).
Comment 2 Ray Griffin (rorgoroth) 2013-03-06 21:55:04 UTC
I too noticed that large memory use, to be expected, some people may desire it if they are serious about lto and its output. I don't desire it personally.

Thanks for the tip, I think I get what you mean, I use such a method for keeping the gold linker default in binutils.

Anyway, I agree with WONTFIX until lto mature and that EXTRA_ECONF is sufficient for now. I was hoping for masked USE purely to be there on the back-burner and as a reminder for the future if anything :)

Thanks for taking the time to test and reply.