git: efdde54bd4f7 - main - net-im/conduit: fix build on armv7

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Tue, 21 Jan 2025 23:47:24 UTC
The branch main has been updated by fuz:

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

commit efdde54bd4f7076b345a994e66976abd412b253f
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-01-20 15:51:47 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-21 23:46:27 +0000

    net-im/conduit: fix build on armv7
    
    This avoids an address space exhaustion due to LTO.
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2025Q1
---
 net-im/conduit/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/net-im/conduit/Makefile b/net-im/conduit/Makefile
index c0b8341fa6f1..1d57863f82c6 100644
--- a/net-im/conduit/Makefile
+++ b/net-im/conduit/Makefile
@@ -35,6 +35,13 @@ USE_GITLAB=	yes
 GL_ACCOUNT=	famedly
 GL_TAGNAME=	f8d7ef04e664580e882bac852877b68e7bd3ab1e
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH:Marmv?}
+LTO_UNSAFE=	yes
+CARGO_ENV+=	CARGO_PROFILE_RELEASE_LTO=false
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's,/etc/conduit.toml,${PREFIX}/etc/conduit.toml,' \
 		${WRKSRC}/src/main.rs
@@ -47,4 +54,4 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/conduit-example.toml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.toml.sample
 	@${MKDIR} ${STAGEDIR}${DBDIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>