what I would do is: quickpkg of two diferentes compilations and i try to test both firefox: normal and with O3-pgo-lto
are there anybody with knowlege for helping me?
thanks so much

i continue reading things...fedeliallalinea wrote:I'm no expert but you can begin to read here while you wait for more answers.

fedeliallalinea wrote:Why not use firefox-bin that is compiled with lto+gpo since 2018?
Code: Select all
- - pgo : Add support for profile-guided optimization using gcc-4.5, for faster binaries.
This option will double the compile time.Code: Select all
/etc/portage/O3-clang
CC="clang"
CXX="clang++"
CFLAGS="-march=native -O3 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j4"oh thanks i try and this are my questions:Josef.95 wrote:papu,
I think the following should probably work (i have it not tested)
1) Enable in package.use www-client/firefox clang lto pgo
2) Set in /etc/portage/env/O3-clang CFLAGS="${CFLAGS} -O3"
and in /etc/portage/package.env www-client/firefox O3-clang
3) and then check it via: ebuild `equery w firefox` clean configure
Code: Select all
0:04.28 WARNING: Disabling LTO because --enable-profile-generate is specifiedCode: Select all
CC="clang"
CXX="clang++"
LTO="-flto=thin"
COMMON_FLAGS="-march=native -O3 -pipe"
CFLAGS="${COMMON_FLAGS} ${LTO}"
CXXFLAGS="${COMMON_FLAGS} ${LTO}"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
Code: Select all
www-client/firefox clanglto-O3.conf
Code: Select all
USE="pgo lto" emerge -av firefox
Code: Select all
--enable-linker=lld forcing ld=lld due to USE=clang and USE=lto
--enable-lto=cross +lto
MOZ_PGO=1 +pgo
--disable-debug -debug
--disable-debug-symbols Gentoo default
--enable-optimize=-O3 from CFLAGSthen why this warning?Josef.95 wrote:papu,
yes, (from your configure output):I think it looks goodCode: Select all
--enable-linker=lld forcing ld=lld due to USE=clang and USE=lto --enable-lto=cross +lto MOZ_PGO=1 +pgo --disable-debug -debug --disable-debug-symbols Gentoo default --enable-optimize=-O3 from CFLAGS
/edit: I think try a build, and then check in firefox adress bar: about:buildconfig
Code: Select all
0:04.28 WARNING: Disabling LTO because --enable-profile-generate is specifiedyes , i return to default settings is nonsense losing time with this , may be when i have a ryzen 4Ionen wrote:You don't need to set anything in package.env to do that on firefox
1. ebuild setup clang stuff for you with USE=clang, trying to change that yourself will likely break things (default-* on clang often mess things up too)
2. with USE="lto pgo" upstream firefox actually _forces_ -O3 even if you've set -O2 (well, for C++.. but C is only third party bundled stuff -- in my about:buildconfig I see my -O2 but there's a -O3 after it, and you'll see it all over the build.log), and of course uses lto
On a side-note, when using gcc, be wary of -O3 with firefox. It has a poor history of runtime issues and ebuild currently adds a -fno-tree-loop-vectorize to workaround #2 above that always enables it.