git: ef0538735a50 - 2024Q2 - deskutils/health: unbreak build on i386

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Thu, 25 Apr 2024 00:50:47 UTC
The branch 2024Q2 has been updated by jbeich:

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

commit ef0538735a5064d289ca9a7ab8fd1f9a2a0f912f
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2024-04-25 00:39:37 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2024-04-25 00:50:02 +0000

    deskutils/health: unbreak build on i386
    
    fatal runtime error: Rust cannot catch foreign exceptions
    thread 'coordinator' panicked at compiler/rustc_middle/src/util/bug.rs:36:26:
    /wrkdirs/usr/ports/lang/rust/work/rustc-1.77.0-src/compiler/rustc_codegen_ssa/src/back/write.rs:1588:29: worker thread panicked
    (signal: 6, SIGABRT: process abort signal)
    
    Reported by:    pkg-fallout
    
    (cherry picked from commit b74febdcf13b52b2e168a75c49549229fa7f283a)
---
 deskutils/health/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/deskutils/health/Makefile b/deskutils/health/Makefile
index a0c570797eba..79c59e3239e2 100644
--- a/deskutils/health/Makefile
+++ b/deskutils/health/Makefile
@@ -27,6 +27,12 @@ CARGO_INSTALL=	no
 CARGO_TEST=	no
 GLIB_SCHEMAS=	dev.Cogitri.Health.gschema.xml
 
+.if ${MACHINE_ARCH} == i386
+# https://github.com/rust-lang/rust/issues/85598
+LTO_UNSAFE=	yes
+CARGO_ENV+=	CARGO_PROFILE_RELEASE_LTO=false
+.endif
+
 post-patch:
 # Make each cargo subcommand very verbose
 # Add explicit <triple> subdir for --target from USES=cargo