win32_deps_build.sh: avoid duplicate boost definitions

Boost stacktrace defines a few UUIDs that were recently added
to mingw as well [1], causing compilation errors [2]:

  In file included from libs/stacktrace/build/../src/windbg.cpp:9:
  ./boost/stacktrace/detail/frame_msvc.ipp:31:5: error: redefinition of
    '__mingw_uuidof_s<IDebugClient>'
    __CRT_UUID_DECL(IDebugClient,0x27fe5639,...

We'll apply a fix that hasn't merged upsteam yet [3].

[1] ce5a9f624d
[2] https://github.com/boostorg/stacktrace/issues/133
[3] https://github.com/boostorg/stacktrace/pull/140

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
This commit is contained in:
Lucian Petrut 2023-08-18 13:10:59 +00:00
parent ec4a2778f6
commit 157ec51caa
1 changed files with 21 additions and 0 deletions

View File

@ -235,6 +235,27 @@ patch -N boost/thread/pthread/thread_data.hpp <<EOL
#endif
EOL
# https://github.com/boostorg/stacktrace/pull/140
# https://github.com/boostorg/stacktrace/issues/133
patch -N boost/stacktrace/detail/frame_msvc.ipp <<'EOL'
--- boost/stacktrace/detail/frame_msvc.ipp 2023-08-18 12:29:37.127229733 +0000
+++ boost/stacktrace/detail/frame_msvc.ipp.new 2023-08-18 12:28:23.713294554 +0000
@@ -28,9 +28,13 @@
#ifdef __CRT_UUID_DECL // for __MINGW32__
+#if !defined(__MINGW32__) || \
+ (!defined(__clang__) && __GNUC__ < 12) || \
+ (defined(__clang__) && __clang_major__ < 16)
__CRT_UUID_DECL(IDebugClient,0x27fe5639,0x8407,0x4f47,0x83,0x64,0xee,0x11,0x8f,0xb0,0x8a,0xc8)
__CRT_UUID_DECL(IDebugControl,0x5182e668,0x105e,0x416e,0xad,0x92,0x24,0xef,0x80,0x04,0x24,0xba)
__CRT_UUID_DECL(IDebugSymbols,0x8c31e98c,0x983a,0x48a5,0x90,0x16,0x6f,0xe5,0xd6,0x67,0xa9,0x50)
+#endif
#elif defined(DEFINE_GUID) && !defined(BOOST_MSVC)
DEFINE_GUID(IID_IDebugClient,0x27fe5639,0x8407,0x4f47,0x83,0x64,0xee,0x11,0x8f,0xb0,0x8a,0xc8);
DEFINE_GUID(IID_IDebugControl,0x5182e668,0x105e,0x416e,0xad,0x92,0x24,0xef,0x80,0x04,0x24,0xba);
EOL
./bootstrap.sh
if [[ $ENABLE_SHARED == "ON" ]]; then