git: 37790b26cbda - main - x11/virtualgl: fix build with lld 17

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 03 Dec 2023 14:43:52 UTC
The branch main has been updated by dim:

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

commit 37790b26cbda11cd4bb6f237b86cd94739c4059c
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-12-03 14:35:33 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-03 14:40:25 +0000

    x11/virtualgl: fix build with lld 17
    
    Building x11/virtualgl with lld 17 results in the following link errors:
    
      ld: error: version script assignment of 'global' to symbol 'clCreateContext' failed: symbol not defined
    
    Since the same linker version script is used for all "libvglfaker"
    library variants, where only one of the implements the clCreateContext
    symbol, suppress errors with lld >= 17 due to this undefined symbol.
    
    PR:             273753
    MFH:            2023Q4
---
 x11/virtualgl/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/x11/virtualgl/Makefile b/x11/virtualgl/Makefile
index 3e2f0c99cafb..2f777cefb3b0 100644
--- a/x11/virtualgl/Makefile
+++ b/x11/virtualgl/Makefile
@@ -25,6 +25,11 @@ CMAKE_ARGS=	-DTJPEG_INCLUDE_DIR=${LOCALBASE}/include \
 		-DCMAKE_INSTALL_DOCDIR=${DOCSDIR}
 CMAKE_INSTALL_PREFIX=	${LOCALBASE}/VirtualGL
 
+# Some versioned symbols in virtualgl are undefined when libvglfaker.so
+# is linked. Suppress errors with lld >= 17 due to these undefined
+# symbols.
+LDFLAGS+=	-Wl,--undefined-version
+
 DOCSDIR=	${LOCALBASE}/VirtualGL/doc
 
 OPTIONS_DEFINE=	OPENCL OPENSSL XVIDEO DOCS