Created attachment 904249 [details, diff] Add ability to specify custom *FLAGS when building Chromium At the moment, the Chromium build system does not allow you to pass your own *FLAGS to the build system, which makes it impossible to pass optimisation flags (`-march=native`, etc.) or override incorrect target architecture definitions (as far as I know, this occasionally happens on ARM64). I use a patch that adds this feature together with custom ebuild. Attached the patch. Here are the corresponding lines in the modified ebuild: if ! use custom-cflags; then strip-flags fi myconf_gn+=" custom_cflags=[ $(echo ${CFLAGS} | tr ' ' ',' | sed 's/,/\", \"/g; s/^/\"/; s/$/\"/') ]" myconf_gn+=" custom_ldflags=[ $(echo ${LDFLAGS} | tr ' ' ',' | sed 's/,/\", \"/g; s/^/\"/; s/$/\"/') ]" myconf_gn+=" custom_rustflags=[ $(echo ${RUSTFLAGS} | sed 's/-C \([^ ]*\)/-C\1/g' | sed 's/-Z \([^ ]*\)/-Z\1/g' | tr ' ' ',' | sed 's/,/\", \"/g; s/^/\"/; s/$/\"/') ]" It's not very pretty, but it works and that's good enough for me. Source: https://codeberg.org/benjama/chromium-vitallium/src/commit/378a1301054aa88171b194f22c33b0721be32267/custom/9002-add-ability-to-specify-custom-flags.patch
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1137a053f17d447d92c3a76e77541c639b174118 commit 1137a053f17d447d92c3a76e77541c639b174118 Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2024-10-02 07:05:17 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2024-10-02 07:18:15 +0000 www-client/google-chrome: automated update (129.0.6668.89) Bug: https://bugs.gentoo.org/940530 Signed-off-by: Matt Jolly <kangie@gentoo.org> www-client/google-chrome/Manifest | 2 +- ...e-chrome-129.0.6668.70.ebuild => google-chrome-129.0.6668.89.ebuild} | 0 2 files changed, 1 insertion(+), 1 deletion(-)
Sorry, mistyped the bug for the chrome binary update. I'll take a look at this when I have time.