Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 770055 - www-client/firefox and thunderbird could benefit from lld parallelism on Raspberry Pi
Summary: www-client/firefox and thunderbird could benefit from lld parallelism on Rasp...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal enhancement (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-11 11:55 UTC by Cănărău Constantin
Modified: 2021-02-17 21:26 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cănărău Constantin 2021-02-11 11:55:47 UTC
When compiled with clang, Firefox and Thunderbird final link is done by lld on single thread.
Adding append-ldflags "-Wl,--thinlto-jobs=4" to ebuild speed up compile time on Raspberry Pi 4 8GB RAM with over an hour.
It is possible that also x86 and amd64 compile time to be improved.

pi /var/db/repos # diff -u gentoo/mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild pi/mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild 
--- gentoo/mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild	2021-02-11 00:09:17.000000000 +0200
+++ pi/mail-client/thunderbird/thunderbird-78.7.1-r1.ebuild	2021-02-11 13:40:38.317477136 +0200
@@ -705,6 +705,8 @@
 			mozconfig_add_options_ac "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld
 
 			mozconfig_add_options_ac '+lto' --enable-lto=cross
+
+			append-ldflags "-Wl,--thinlto-jobs=4"
 		else
 			# Linking only works when using ld.gold when LTO is enabled
 			mozconfig_add_options_ac "forcing ld=gold due to USE=lto" --enable-linker=gold


pi /var/db/repos # diff -u gentoo/www-client/firefox/firefox-85.0.2-r1.ebuild  pi/www-client/firefox/firefox-85.0.2-r1.ebuild 
--- gentoo/www-client/firefox/firefox-85.0.2-r1.ebuild	2021-02-11 00:09:20.000000000 +0200
+++ pi/www-client/firefox/firefox-85.0.2-r1.ebuild	2021-02-11 10:41:47.959488162 +0200
@@ -712,6 +712,8 @@
 			mozconfig_add_options_ac "forcing ld=lld due to USE=clang and USE=lto" --enable-linker=lld
 
 			mozconfig_add_options_ac '+lto' --enable-lto=cross
+
+			append-ldflags "-Wl,--thinlto-jobs=4"
 		else
 			# ThinLTO is currently broken, see bmo#1644409
 			mozconfig_add_options_ac '+lto' --enable-lto=full

I using that change since three versions now. Pi has 4 cores but, I believe that, generically, JOBSERVERS or MAKEOPTS jobs should be used, or half of them.

genlop -t firefox
 * www-client/firefox

     Sun Jan 10 14:44:37 2021 >>> www-client/firefox-84.0.2
       merge time: 5 hours, 30 minutes and 53 seconds.

     Sun Jan 10 21:33:14 2021 >>> www-client/firefox-84.0.2
       merge time: 4 hours, 45 minutes and 14 seconds.

     Wed Jan 27 06:10:08 2021 >>> www-client/firefox-85.0
       merge time: 5 hours, 13 minutes and 25 seconds.

     Thu Jan 28 02:46:58 2021 >>> www-client/firefox-85.0
       merge time: 4 hours, 18 minutes and 24 seconds.

     Wed Feb  3 00:54:00 2021 >>> www-client/firefox-85.0-r1
       merge time: 4 hours, 20 minutes and 33 seconds.

     Fri Feb  5 02:19:32 2021 >>> www-client/firefox-85.0-r1
       merge time: 4 hours, 24 minutes and 40 seconds.

     Sun Feb  7 20:26:33 2021 >>> www-client/firefox-85.0.1
       merge time: 4 hours, 19 minutes and 55 seconds.

So it went from 5:30 hours to 4:20.

Reproducible: Always