net-libs/nodejs: filter out user-defined LTO flags

Node build scripts insert user-defined compiler/linker flags after the
ones they define themselves, meaning that user-defined -flto
can override the -fno-lto set for v8_cppgc_shared - triggering build
errors.

Signed-off-by: Marek Szuba <marecki@gentoo.org>
This commit is contained in:
Marek Szuba
2021-04-23 15:48:39 +02:00
parent 175ea598c8
commit 5f0fc09e53
3 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -6,7 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE="threads(+)"
inherit bash-completion-r1 pax-utils python-any-r1 toolchain-funcs xdg-utils
inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
HOMEPAGE="https://nodejs.org/"
@@ -105,6 +105,9 @@ src_prepare() {
src_configure() {
xdg_environment_reset
# LTO compiler flags are handled by configure.py itself
filter-flags '-flto*'
local myconf=(
--shared-brotli
--shared-cares
+4 -1
View File
@@ -6,7 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE="threads(+)"
inherit bash-completion-r1 pax-utils python-any-r1 toolchain-funcs xdg-utils
inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
HOMEPAGE="https://nodejs.org/"
@@ -103,6 +103,9 @@ src_prepare() {
src_configure() {
xdg_environment_reset
# LTO compiler flags are handled by configure.py itself
filter-flags '-flto*'
local myconf=(
--shared-brotli
--shared-cares
+4 -1
View File
@@ -6,7 +6,7 @@ EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_REQ_USE="threads(+)"
inherit bash-completion-r1 pax-utils python-any-r1 toolchain-funcs xdg-utils
inherit bash-completion-r1 flag-o-matic pax-utils python-any-r1 toolchain-funcs xdg-utils
DESCRIPTION="A JavaScript runtime built on Chrome's V8 JavaScript engine"
HOMEPAGE="https://nodejs.org/"
@@ -102,6 +102,9 @@ src_prepare() {
src_configure() {
xdg_environment_reset
# LTO compiler flags are handled by configure.py itself
filter-flags '-flto*'
local myconf=(
--shared-brotli
--shared-cares