Skip to content

Commit

Permalink
[Mod] libopenmpt: Deprecate the use of mingw-std-threads. See <https:…
Browse files Browse the repository at this point in the history
  • Loading branch information
manxorist committed May 25, 2022
1 parent 4b49bf2 commit 1f16272
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions libopenmpt/dox/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ is just a high-level summary.
defaults to `1` and implies building a liballegro42 locally. This requires
executing `build/download_externals.sh` before building to download the
liballegro42 sources.
* [**Change**] Support for mingw-std-threads when building for MinGW targets
is now deprecated because this is not supported for GCC 11 or later (see
<https://github.com/meganz/mingw-std-threads/issues/79>).

* [**Regression**] Full support for Visual Studio 2017 has been removed. We
still support targeting Windows XP with Visual Studio 2017.
Expand Down
3 changes: 1 addition & 2 deletions libopenmpt/dox/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Dependencies
* **GCC 8.1** or higher
* **Clang 7** or higher
* **MinGW-W64 8.1** or higher (it is recommended to preferably use
posix threading model as opposed to win32 threading model, or at least
have mingw-std-threads available otherwise)
posix threading model as opposed to win32 threading model)
* **emscripten 3.1.1** or higher
* **DJGPP GCC 8.1** or higher
* any other **C++17 compliant** compiler
Expand Down
8 changes: 6 additions & 2 deletions libopenmpt/libopenmpt_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,12 @@ MPT_WARNING("Warning: libopenmpt for WinRT is built with reduced functionality.
MPT_WARNING("Warning: libopenmpt built in non thread-safe mode because mutexes are not supported by the C++ standard library available.")
#endif // MPT_MUTEX_NONE

#if (defined(__MINGW32__) || defined(__MINGW64__)) && !defined(_GLIBCXX_HAS_GTHREADS) && !defined(MPT_WITH_MINGWSTDTHREADS)
MPT_WARNING("Warning: Building libopenmpt with MinGW-w64 without std::thread support is not recommended and is deprecated. Please use MinGW-w64 with posix threading model (as opposed to win32 threading model), or build with mingw-std-threads.")
#if (defined(__MINGW32__) || defined(__MINGW64__)) && !defined(_GLIBCXX_HAS_GTHREADS)
#if defined(MPT_WITH_MINGWSTDTHREADS)
MPT_WARNING("Warning: Building with mingw-std-threads is deprecated because this is not supported with GCC 11 or later.")
#else // !MINGWSTDTHREADS
MPT_WARNING("Warning: Building libopenmpt with MinGW-w64 without std::thread support is not recommended and is deprecated. Please use MinGW-w64 with posix threading model (as opposed to win32 threading model).")
#enduf // MINGWSTDTHREADS
#endif // MINGW

#if MPT_CLANG_AT_LEAST(5,0,0) && MPT_CLANG_BEFORE(11,0,0) && defined(__powerpc__) && !defined(__powerpc64__)
Expand Down

0 comments on commit 1f16272

Please sign in to comment.