commit:     d38ad8ea49347979a4a87202e1d51702297216aa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 20 22:25:11 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 20 22:26:01 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d38ad8ea

net-libs/nodejs: pass -mbranch-protection=none on arm64

BTI seems to cause build failures in VMs on Apple arm64 HW with
-march=native. Just disable it for now given nodejs is already a beast.

Thanks to chaos_princess for the suggestion.

Closes: https://bugs.gentoo.org/931514
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-libs/nodejs/nodejs-22.4.1-r1.ebuild | 2 ++
 net-libs/nodejs/nodejs-22.7.0.ebuild    | 2 ++
 net-libs/nodejs/nodejs-22.8.0.ebuild    | 2 ++
 net-libs/nodejs/nodejs-99999999.ebuild  | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/net-libs/nodejs/nodejs-22.4.1-r1.ebuild 
b/net-libs/nodejs/nodejs-22.4.1-r1.ebuild
index c18f06e68056..9dce8c018258 100644
--- a/net-libs/nodejs/nodejs-22.4.1-r1.ebuild
+++ b/net-libs/nodejs/nodejs-22.4.1-r1.ebuild
@@ -120,6 +120,8 @@ src_configure() {
        # causing it to fail to catch exceptions sometimes
        # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116057
        tc-is-gcc && append-cxxflags -fno-tree-vectorize
+       # https://bugs.gentoo.org/931514
+       use arm64 && append-flags $(test-flags-CXX -mbranch-protection=none)
        # nodejs unconditionally links to libatomic #869992
        # specifically it requires __atomic_is_lock_free which
        # is not yet implemented by sys-libs/compiler-rt (see

diff --git a/net-libs/nodejs/nodejs-22.7.0.ebuild 
b/net-libs/nodejs/nodejs-22.7.0.ebuild
index bc4c9333bb81..da3ea85862a7 100644
--- a/net-libs/nodejs/nodejs-22.7.0.ebuild
+++ b/net-libs/nodejs/nodejs-22.7.0.ebuild
@@ -123,6 +123,8 @@ src_configure() {
        # causing it to fail to catch exceptions sometimes
        # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116057
        tc-is-gcc && append-cxxflags -fno-tree-vectorize
+       # https://bugs.gentoo.org/931514
+       use arm64 && append-flags $(test-flags-CXX -mbranch-protection=none)
        # nodejs unconditionally links to libatomic #869992
        # specifically it requires __atomic_is_lock_free which
        # is not yet implemented by sys-libs/compiler-rt (see

diff --git a/net-libs/nodejs/nodejs-22.8.0.ebuild 
b/net-libs/nodejs/nodejs-22.8.0.ebuild
index 2c68aa6262a1..c934774934fe 100644
--- a/net-libs/nodejs/nodejs-22.8.0.ebuild
+++ b/net-libs/nodejs/nodejs-22.8.0.ebuild
@@ -123,6 +123,8 @@ src_configure() {
        # causing it to fail to catch exceptions sometimes
        # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116057
        tc-is-gcc && append-cxxflags -fno-tree-vectorize
+       # https://bugs.gentoo.org/931514
+       use arm64 && append-flags $(test-flags-CXX -mbranch-protection=none)
        # nodejs unconditionally links to libatomic #869992
        # specifically it requires __atomic_is_lock_free which
        # is not yet implemented by sys-libs/compiler-rt (see

diff --git a/net-libs/nodejs/nodejs-99999999.ebuild 
b/net-libs/nodejs/nodejs-99999999.ebuild
index 2c68aa6262a1..c934774934fe 100644
--- a/net-libs/nodejs/nodejs-99999999.ebuild
+++ b/net-libs/nodejs/nodejs-99999999.ebuild
@@ -123,6 +123,8 @@ src_configure() {
        # causing it to fail to catch exceptions sometimes
        # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116057
        tc-is-gcc && append-cxxflags -fno-tree-vectorize
+       # https://bugs.gentoo.org/931514
+       use arm64 && append-flags $(test-flags-CXX -mbranch-protection=none)
        # nodejs unconditionally links to libatomic #869992
        # specifically it requires __atomic_is_lock_free which
        # is not yet implemented by sys-libs/compiler-rt (see

Reply via email to