git: d4582029d51d - main - lang/spidermonkey78: fix build on powerpc with LLVM 13

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sat, 02 Apr 2022 20:43:07 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d4582029d51d8c34cac13144bf1d75175175ab16

commit d4582029d51d8c34cac13144bf1d75175175ab16
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-04-02 20:31:18 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-04-02 20:31:18 +0000

    lang/spidermonkey78: fix build on powerpc with LLVM 13
    
    Disable RUST_BACKTRACE on powerpc to fix libunwind crash.
---
 lang/spidermonkey78/Makefile                                   |  2 ++
 lang/spidermonkey78/files/extra-patch-config_makefiles_rust.mk | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/lang/spidermonkey78/Makefile b/lang/spidermonkey78/Makefile
index 9647c44e7792..7a94046b0f28 100644
--- a/lang/spidermonkey78/Makefile
+++ b/lang/spidermonkey78/Makefile
@@ -56,6 +56,8 @@ PLIST_SUB=	SP_VER=${SP_VER}
 
 .if ${ARCH} == amd64
 CONFIGURE_TARGET=	x86_64-portbld-freebsd${OSREL}
+.elif ${ARCH} == powerpc
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-config_makefiles_rust.mk
 .endif
 
 # Require newer Clang than what's in base system unless user opted out
diff --git a/lang/spidermonkey78/files/extra-patch-config_makefiles_rust.mk b/lang/spidermonkey78/files/extra-patch-config_makefiles_rust.mk
new file mode 100644
index 000000000000..305aa3df68c4
--- /dev/null
+++ b/lang/spidermonkey78/files/extra-patch-config_makefiles_rust.mk
@@ -0,0 +1,10 @@
+--- config/makefiles/rust.mk.orig	2022-04-02 10:37:19 UTC
++++ config/makefiles/rust.mk
+@@ -171,7 +171,6 @@ export LIBCLANG_PATH=$(MOZ_LIBCLANG_PATH)
+ export CLANG_PATH=$(MOZ_CLANG_PATH)
+ export PKG_CONFIG
+ export PKG_CONFIG_ALLOW_CROSS=1
+-export RUST_BACKTRACE=full
+ export MOZ_TOPOBJDIR=$(topobjdir)
+ 
+ # Set COREAUDIO_SDK_PATH for third_party/rust/coreaudio-sys/build.rs