Skip to content

Commit c8a8e3f

Browse files
committed
Removed support for mingw-std-threads
The support for MinGW >= 11 is broken (meganz/mingw-std-threads#79), which prevents building on Debian Bookworm. This commit fixes it by explicitely building with the POSIX variant of MinGW, which has built-in support for std threads.
1 parent 17df160 commit c8a8e3f

File tree

6 files changed

+6
-37
lines changed

6 files changed

+6
-37
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
5050
# 3P dependencies.
5151
include(BuildFmt)
5252
include(BuildSpdlog)
53-
54-
if (BUILD_LINUX_MIDDLEWARE)
55-
include(BuildMingwStdThreads)
56-
endif()
57-
5853
include(BuildGoogleTest)
5954

6055
if (BUILD_TESTS)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sudo apt install windows-fido-bridge
4848
You can also build this repository from source:
4949

5050
```
51-
sudo apt install build-essential cmake g++-mingw-w64-x86-64 git
51+
sudo apt install build-essential cmake g++-mingw-w64-x86-64-posix git
5252
5353
git clone https://github.com/mgbowen/windows-fido-bridge.git
5454
cd windows-fido-bridge

cmake/BuildGoogleTest.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
2222
if (MINGW)
2323
# When cross-compiling with MinGW, make the Google Test-generated
2424
# executables statically-linked to allow them to run with no extra DLLs.
25-
include(BuildMingwStdThreads)
26-
27-
target_link_libraries(gtest PUBLIC -static mingw_stdthreads)
28-
target_link_libraries(gtest_main PUBLIC -static mingw_stdthreads)
25+
target_link_libraries(gtest PUBLIC -static)
26+
target_link_libraries(gtest_main PUBLIC -static)
2927
endif()

cmake/BuildMingwStdThreads.cmake

Lines changed: 0 additions & 23 deletions
This file was deleted.

cmake/BuildSpdlog.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
include(BuildFmt)
2-
include(BuildMingwStdThreads)
32

43
include(FetchContent)
54

@@ -22,5 +21,5 @@ option(SPDLOG_FMT_EXTERNAL "" ON)
2221
add_subdirectory(${spdlog_SOURCE_DIR} ${spdlog_BINARY_DIR})
2322

2423
if (MINGW)
25-
target_link_libraries(spdlog PUBLIC mingw_stdthreads fmt)
24+
target_link_libraries(spdlog PUBLIC fmt)
2625
endif()

cmake/toolchain-mingw64.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ set(CMAKE_SYSTEM_NAME Windows)
22
set(CMAKE_SYSTEM_PROCESSOR x86_64)
33

44
set(prefix x86_64-w64-mingw32-)
5-
set(CMAKE_C_COMPILER ${prefix}gcc)
6-
set(CMAKE_CXX_COMPILER ${prefix}g++)
5+
set(CMAKE_C_COMPILER ${prefix}gcc-posix)
6+
set(CMAKE_CXX_COMPILER ${prefix}g++-posix)
77

88
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
99
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)

0 commit comments

Comments
 (0)