git: eedc078964e5 - main - multimedia/gstreamer1-plugins-rust: unbreak build on i386

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 21 Aug 2023 08:01:36 UTC
The branch main has been updated by jbeich:

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

commit eedc078964e546ac1e4a0b59a51d10e0f7263d58
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-07-11 05:18:21 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-08-21 08:01:29 +0000

    multimedia/gstreamer1-plugins-rust: unbreak build on i386
    
    fatal runtime error: Rust cannot catch foreign exceptions
    thread '<unnamed>' panicked at '/wrkdirs/usr/ports/lang/rust/work/rustc-1.70.0-src/compiler/rustc_codegen_ssa/src/back/write.rs:1535:21: worker thread panicked', compiler/rustc_middle/src/util/bug.rs:36:26
    (signal: 6, SIGABRT: process abort signal)
    
    LLVM ERROR: out of memory
    Allocation failed
    error: could not compile `gst-plugin-webrtc` (lib)
    
    Reported by:    pkg-fallout
---
 multimedia/gstreamer1-plugins-rust/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/multimedia/gstreamer1-plugins-rust/Makefile b/multimedia/gstreamer1-plugins-rust/Makefile
index d3f23e160b52..038a2f1ca030 100644
--- a/multimedia/gstreamer1-plugins-rust/Makefile
+++ b/multimedia/gstreamer1-plugins-rust/Makefile
@@ -27,6 +27,11 @@ CARGO_BUILD=	no
 CARGO_INSTALL=	no
 CARGO_TEST=	no
 
+.if ${MACHINE_ARCH} == i386
+# Fixes error "Rust cannot catch foreign exceptions"
+LTO_UNSAFE=	yes
+.endif
+
 OPTIONS_DEFINE=	ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP
 OPTIONS_DEFAULT=ASM CAIRO CSOUND DAV1D GTK4 PANGO SODIUM WEBP
 OPTIONS_EXCLUDE_aarch64=	CSOUND # https://github.com/neithanmo/csound-rs/commit/8962b89d7bda