building without this and tests disabled, the build succeeds, then later fails when used in any applications due to ucontext not being set as needed and never loaded, while being required for libtbb to function. --- a/cmake/compilers/GNU.cmake +++ b/cmake/compilers/GNU.cmake @@ -40,9 +40,9 @@ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$>,$>>:-mwaitpkg>) endif() if (NOT MINGW) - set(TBB_COMMON_LINK_LIBS dl) + set(TBB_COMMON_LINK_LIBS dl ucontext) endif() # Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled. if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)