git: 6abf052d171d - main - graphics/mesa: Re-add --undefined-version

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Fri, 24 Nov 2023 12:40:01 UTC
The branch main has been updated by manu:

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

commit 6abf052d171d602a9b3c5de1f94061b9fb4bfb16
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2023-11-24 12:38:32 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-11-24 12:39:58 +0000

    graphics/mesa: Re-add --undefined-version
    
    This is needed for linking with lld 17 and it was lost in the update
    to 23.1.8
    
    Reported by:    dim
    Fixes:          29d855b6f775 ("graphics/mesa: update to 23.1.8")
    Sponsored by:   Beckohh Automation GmbH & Co. KG
---
 graphics/mesa-dri/Makefile.common | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common
index c046d4f0eb4e..1095a78d359c 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -82,6 +82,12 @@ BINARY_ALIAS+=	python3=${PYTHON_VERSION}
 
 CONFIGURE_ENV+=	LLVM_CONFIG=${LLVM_CONFIG}
 
+
+# Some symbols in mesa's linker version scripts are not always defined,
+# depending on configuration options. Suppress errors with lld >= 17 due to
+# these undefined symbols.
+LDFLAGS+=	-Wl,--undefined-version
+
 LDFLAGS+=	-Wl,-rpath=${LOCALBASE}/llvm${LLVM_VERSION}/lib
 MESON_ARGS+=	-Dllvm=enabled \
 		-Dlibunwind=disabled \