git: 8bfcc7c9738a - main - benchmarks/lzbench: fix the port's build on ARM and RISC-V

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Tue, 24 May 2022 13:39:54 UTC
The branch main has been updated by danfe:

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

commit 8bfcc7c9738a835ba65030236d816c222cb5e8fc
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-05-24 13:39:30 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-05-24 13:39:30 +0000

    benchmarks/lzbench: fix the port's build on ARM and RISC-V
    
    While here, mute the compiler when it is being called inside the
    GNU make's $(shell ...) context: these errors do not cause build
    failures (they are not propagated to the caller) but can confuse
    careless readers of the build log.
    
    PR:     260625
---
 benchmarks/lzbench/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/benchmarks/lzbench/Makefile b/benchmarks/lzbench/Makefile
index ead1d54a6f93..544f0d35a83f 100644
--- a/benchmarks/lzbench/Makefile
+++ b/benchmarks/lzbench/Makefile
@@ -8,8 +8,6 @@ CATEGORIES=	benchmarks
 MAINTAINER=	danfe@FreeBSD.org
 COMMENT=	In-memory benchmark of open-source LZ77/LZSS/LZMA compressors
 
-BROKEN_riscv64=		fails to compile: invalid arch name 'native', string must begin with rv32{i,e,g} or rv64{i,g}
-
 USES=		compiler:c11 gmake
 USE_GITHUB=	yes
 GH_ACCOUNT=	inikep
@@ -22,6 +20,12 @@ OPTIONS_DEFINE=	DOCS
 post-patch:
 	@${REINPLACE_CMD} -e '/PROGOS/s,Linux,${OPSYS},' \
 		${WRKSRC}/_lzbench/lzbench.h
+	@${REINPLACE_CMD} -e 's,shell echo|$$(CC),& 2>/dev/null,' \
+		${WRKSRC}/Makefile
+	@${REINPLACE_CMD} -e '/pithy_Load64/s,vld1_u64(,&(uint64_t *),' \
+		${WRKSRC}/pithy/pithy.cpp
+	@${REINPLACE_CMD} -e '/^#if/s,defined(__aarch64__),& ||\
+		__riscv_xlen == 64,' ${WRKSRC}/tornado/Common.h
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/lzbench ${STAGEDIR}${PREFIX}/bin