git: c4e8eb234992 - 2023Q4 - www/garage: fix build on armv7/i386

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Sat, 18 Nov 2023 20:25:00 UTC
The branch 2023Q4 has been updated by fuz:

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

commit c4e8eb2349929c90f539f4b795c254ead851d632
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-11-17 21:07:45 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-11-18 20:24:40 +0000

    www/garage: fix build on armv7/i386
    
    Disable LTO to avoid address space exhaustion.
    
    Approved by:    portmgr (build fix blanket)
    MFH:            2023Q4
    
    (cherry picked from commit 4d8e2ded5eded61e8a48511cf85a1b38956e0269)
---
 www/garage/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/garage/Makefile b/www/garage/Makefile
index 410f3d7cc806..d4cae68f399f 100644
--- a/www/garage/Makefile
+++ b/www/garage/Makefile
@@ -22,6 +22,13 @@ SUB_FILES=	pkg-message
 USE_RC_SUBR=	garage
 CARGO_VENDOR_DIR=	${WRKDIR}/cargo-crates
 
+.include <bsd.port.pre.mk>
+
+.if ${MACHINE_ARCH:Marmv?} || ${MACHINE_ARCH} == i386
+LTO_UNSAFE=	yes
+CARGO_ENV+=	CARGO_PROFILE_RELEASE_LTO=false
+.endif
+
 post-extract:
 	${MV} -v ${WRKDIR}/${PORTNAME} ${WRKSRC}
 
@@ -33,4 +40,4 @@ post-install:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "! -name *\.bak"
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>