Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2023 16:17:51 GMT
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 48cc556c9e9d - main - misc/vfc: fix build on armv7
Message-ID:  <202304281617.33SGHpsk044382@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fuz:

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

commit 48cc556c9e9dfba6d40ebac37b5df51ac20df6d7
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-04-24 00:56:59 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-28 16:13:36 +0000

    misc/vfc: fix build on armv7
    
    Supply -mfpu=neon-fp16 in CXXFLAGS to permit use of half-precision
    floats in NEON code.  This is supported by armv7 devices as early as
    the Raspberry Pi 2, but excludes armv6 devices (these don't have NEON).
    
    Approved by:    portmgr (build fix blanket)
---
 misc/vfc/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/misc/vfc/Makefile b/misc/vfc/Makefile
index a0de1ad1c3a7..e87abb5c08bb 100644
--- a/misc/vfc/Makefile
+++ b/misc/vfc/Makefile
@@ -10,6 +10,9 @@ WWW=		https://github.com/akb825/VertexFormatConvert
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
+NOT_FOR_ARCHS=	armv6
+NOT_FOR_ARCHS_REASON=	requires NEON with FP16 support on ARM
+
 TEST_DEPENDS=	googletest>0:devel/googletest
 
 USES=		cmake:testing compiler:c++14-lang
@@ -24,4 +27,7 @@ CMAKE_ON=	VFC_SHARED
 CMAKE_OFF=	VFC_BUILD_TESTS
 CMAKE_TESTING_ON=	VFC_BUILD_TESTS
 
+CXXFLAGS+=	${CXXFLAGS_${ARCH}}
+CXXFLAGS_armv7=	-mfpu=neon-fp16
+
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304281617.33SGHpsk044382>