git: 3677983542cc - main - devel/onetbb: fix build with lld 17

From: Ganael LAPLANCHE <martymac_at_FreeBSD.org>
Date: Mon, 09 Oct 2023 10:19:14 UTC
The branch main has been updated by martymac:

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

commit 3677983542cc09a0e5f085e463a895e9e4dce9aa
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-10-09 10:16:49 +0000
Commit:     Ganael LAPLANCHE <martymac@FreeBSD.org>
CommitDate: 2023-10-09 10:16:49 +0000

    devel/onetbb: fix build with lld 17
    
    Many symbols in the linker version scripts are undefined because link
    time optimization (-flto=thin) removes them. Suppress errors with
    lld >= 17 due to these undefined symbols.
    
    PR:     274337
    Reported by:    dim
---
 devel/onetbb/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/devel/onetbb/Makefile b/devel/onetbb/Makefile
index ae0022a7ae78..4b4eaccf0be0 100644
--- a/devel/onetbb/Makefile
+++ b/devel/onetbb/Makefile
@@ -18,6 +18,11 @@ CMAKE_ARGS+=	-DTBB_STRICT:BOOL=FALSE \
 		-DCMAKE_HWLOC_2_LIBRARY_PATH:PATH="${LOCALBASE}/lib/libhwloc.so" \
 		-DCMAKE_HWLOC_2_INCLUDE_PATH:PATH="${LOCALBASE}/include"
 
+# Many symbols in the linker version scripts are undefined because link time
+# optimization (-flto=thin) removes them. Suppress errors with lld >= 17 due to
+# these undefined symbols.
+LDFLAGS+=	-Wl,--undefined-version
+
 CONFLICTS=	tbb
 
 USE_GITHUB=	yes