git: 4d8e2ded5ede - main - www/garage: fix build on armv7/i386

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

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

commit 4d8e2ded5eded61e8a48511cf85a1b38956e0269
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:20:43 +0000

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

diff --git a/www/garage/Makefile b/www/garage/Makefile
index f887d6bcfe31..0b799c6ed4d7 100644
--- a/www/garage/Makefile
+++ b/www/garage/Makefile
@@ -23,6 +23,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}
 
@@ -34,4 +41,4 @@ post-install:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} "! -name *\.bak"
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>