12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake
- index dcd66634..c8f67d4a 100644
- --- a/cmake/compilers/Clang.cmake
- +++ b/cmake/compilers/Clang.cmake
- @@ -66,7 +66,7 @@ endif()
- set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security -fPIC $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-fstack-protector-strong>)
-
- # -z switch is not supported on MacOS
- -if (NOT APPLE)
- +if (NOT APPLE AND NOT MINGW)
- set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now)
- endif()
-
- diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
- index cf6d8bdb..8f4dbc7f 100644
- --- a/cmake/compilers/GNU.cmake
- +++ b/cmake/compilers/GNU.cmake
- @@ -36,6 +36,10 @@ if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)
- endif()
-
-
- +if(MINGW)
- + set(_tbb_gnu_asm_major_version "2")
- + set(_tbb_gnu_asm_minor_version "43")
- +else()
- # Binutils < 2.31.1 do not support the tpause instruction. When compiling with
- # a modern version of GCC (supporting it) but relying on an outdated assembler,
- # will result in an error reporting "no such instruction: tpause".
- @@ -61,6 +65,7 @@ unset(ASSEMBLER_VERSION_LINE_OUT)
- unset(ASSEMBLER_VERSION_LINE_ERR)
- unset(ASSEMBLER_VERSION_LINE)
- message(TRACE "Extracted GNU assembler version: major=${_tbb_gnu_asm_major_version} minor=${_tbb_gnu_asm_minor_version}")
- +endif()
-
- math(EXPR _tbb_gnu_asm_version_number "${_tbb_gnu_asm_major_version} * 1000 + ${_tbb_gnu_asm_minor_version}")
- set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} "-D__TBB_GNU_ASM_VERSION=${_tbb_gnu_asm_version_number}")
- diff --git a/include/oneapi/tbb/profiling.h b/include/oneapi/tbb/profiling.h
- index 412b5a35..fccaba5f 100644
- --- a/include/oneapi/tbb/profiling.h
- +++ b/include/oneapi/tbb/profiling.h
- @@ -132,7 +132,7 @@ namespace d1 {
- r1::call_itt_notify(static_cast<int>(t), ptr);
- }
-
- -#if (_WIN32||_WIN64) && !__MINGW32__
- +#if (_WIN32||_WIN64)
- inline void itt_set_sync_name(void* obj, const wchar_t* name) {
- r1::itt_set_sync_name(obj, name);
- }
|