git: c9ff34b39ca8 - main - devel/zapcc: fix build: version script assignment of 'LLVM_5.0' to symbol 'LLVMCreateDisasm' failed: symbol not defined

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Thu, 18 Jul 2024 20:12:34 UTC
The branch main has been updated by vvd:

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

commit c9ff34b39ca801024cd63b693bd0a75701a8669c
Author:     Martin Filla <freebsd@sysctl.cz>
AuthorDate: 2024-07-18 20:08:35 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-18 20:08:35 +0000

    devel/zapcc: fix build: version script assignment of 'LLVM_5.0' to symbol 'LLVMCreateDisasm' failed: symbol not defined
    
    Fix build on FreeBSD 15:
    error: version script assignment of 'LLVM_5.0' to symbol 'LLVMCreateDisasm' failed: symbol not defined
    
    PR:     279767
---
 devel/zapcc/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devel/zapcc/Makefile b/devel/zapcc/Makefile
index ac7f870b3995..8a0aa5ce1176 100644
--- a/devel/zapcc/Makefile
+++ b/devel/zapcc/Makefile
@@ -11,7 +11,6 @@ LICENSE=	NCSA
 LICENSE_FILE=	${WRKSRC}/LICENSE.TXT
 
 BROKEN_riscv64=		fails to build: CMake Error at cmake/config-ix.cmake:407: Unknown architecture riscv64
-BROKEN_FreeBSD_15=	fails to build: failed symbol not defined
 
 BUILD_DEPENDS=	googletest>0:devel/googletest
 
@@ -29,4 +28,6 @@ CONFLICTS_INSTALL=	cling llvm
 CMAKE_OFF=	LLVM_ENABLE_WARNINGS LLVM_BUILD_EXAMPLES LLVM_INCLUDE_EXAMPLES LLVM_INCLUDE_TESTS LLVM_INCLUDE_GO_TESTS LLVM_ENABLE_OCAMLDOC LLVM_BUILD_TEST
 CMAKE_ON=	LLVM_ENABLE_CXX1Y LLVM_ENABLE_LLD BUILD_SHARED_LIBS
 
+LDFLAGS+=	-Wl,--undefined-version
+
 .include <bsd.port.mk>