From cfc3ba4b518c080a476d2f85e533db6922cd526c Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Sun, 11 Feb 2024 22:48:27 +0100 Subject: [PATCH] Fixed msys2 builds --- .github/workflows/c-cpp.yml | 8 +++++++- patches/msys2/typeinfo.patch | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 patches/msys2/typeinfo.patch diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 715e5d9..33676a0 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -343,7 +343,13 @@ jobs: uses: eine/setup-msys2@v2 with: update: true - install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make + install: mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang mingw-w64-x86_64-lld mingw-w64-x86_64-cmake make git + + - name: Apply patch + if: matrix.config.c == 'clang' + run: | + cd / + git apply --verbose --ignore-whitespace --directory=mingw64/include/c++/`ls mingw64/include/c++`/ /d/a/p2pool/p2pool/patches/msys2/typeinfo.patch - name: Build libcurl run: | diff --git a/patches/msys2/typeinfo.patch b/patches/msys2/typeinfo.patch new file mode 100644 index 0000000..818b809 --- /dev/null +++ b/patches/msys2/typeinfo.patch @@ -0,0 +1,14 @@ +diff --git a/typeinfo b/typeinfo +index 4cce6cb..323fbc1 100644 +--- a/typeinfo ++++ b/typeinfo +@@ -189,6 +189,9 @@ namespace std + #endif + + #if __GXX_TYPEINFO_EQUALITY_INLINE || __cplusplus > 202002L ++#ifdef __clang__ ++ __attribute__((always_inline)) ++#endif + _GLIBCXX23_CONSTEXPR inline bool + type_info::operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT + {