Building devel/onetbb with lld 17 results in the following link errors: : && /usr/bin/cc -fPIC -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -flto=thin -fstack-protector-strong -Wl,--version-script="/wrkdirs/share/dim/ports/devel/onetbb/work/oneTBB-2021.10.0/src/tbbmalloc/def/lin64-tbbmalloc.def" -Wl,-z,relro,-z,now -shared -Wl,-soname,libtbbmalloc.so.2 -o clang_17.0_cxx11_64_release/libtbbmalloc.so.2.10 src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backend.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backref.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/frontend.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/large_objects.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.cpp.o src/tbbmalloc/CMakeFiles/tbbmalloc.dir/__/tbb/itt_notify.cpp.o -pthread && : ld: error: version script assignment of 'local' to symbol 'ITT_DoOneTimeInitialization' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'TBB_runtime_interface_version' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'get_memcpy_largest_cachelinesize' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'get_memcpy_largest_cache_size' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'get_mem_ops_method' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'init_mem_ops_method' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'irc__get_msg' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'irc__print' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'override_mem_ops_method' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'set_memcpy_largest_cachelinesize' failed: symbol not defined ld: error: version script assignment of 'local' to symbol 'set_memcpy_largest_cache_size' failed: symbol not defined cc: error: linker command failed with exit code 1 (use -v to see invocation) 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.
Created attachment 245488 [details] devel/onetbb: fix build with lld 17
A commit in branch main references this bug: 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(+)
Committed, thanks Dimitry!