git: e8989d5d9e57 - main - graphics/mesa-dri: fix build with lld 17

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 20 Sep 2023 20:23:51 UTC
The branch main has been updated by dim:

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

commit e8989d5d9e57043bed503e97339f16882513e4c0
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-09-20 17:49:58 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-09-20 20:21:22 +0000

    graphics/mesa-dri: fix build with lld 17
    
    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.
    
    This applies to multiple mesa ports, such as mesa-dri, mesa-libs,
    mesa-gallium-*, etc. So add the LDFLAGS setting to Makefile.common.
    
    PR:             273981
    Approved by:    x11 (manu)
    MFH:            2023Q3
---
 graphics/mesa-dri/Makefile.common | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/graphics/mesa-dri/Makefile.common b/graphics/mesa-dri/Makefile.common
index 8a3753c5a031..2b2e8e7e9a37 100644
--- a/graphics/mesa-dri/Makefile.common
+++ b/graphics/mesa-dri/Makefile.common
@@ -88,3 +88,8 @@ CONFIGURE_ENV+=	LLVM_CONFIG=llvm-config${LLVM_DEFAULT}
 
 LDFLAGS+=	-Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib
 MESON_ARGS+=	-Dllvm=enabled
+
+# 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