[Bug 274337] devel/onetbb: fix build with lld 17

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 07 Oct 2023 16:52:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274337

            Bug ID: 274337
           Summary: devel/onetbb: fix build with lld 17
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: martymac@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(martymac@FreeBSD.org)
          Assignee: martymac@FreeBSD.org

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.