diff --git a/util/build-win.sh b/util/build-win.sh index 66a75c6fc..aa644f0c6 100755 --- a/util/build-win.sh +++ b/util/build-win.sh @@ -16,7 +16,10 @@ cd .. ./autogen.sh -CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-DPTW32_STATIC_LIB -DCURL_STATICLIB -fopenmp -pthread" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared +# -Wa,-mbig-obj: the daemon's large template/boost-heavy TUs (e.g. asyncrpcoperation.cpp) exceed the +# standard PE/COFF ~32k-section limit, which makes GNU ld emit "dangerous relocation" on .pdata and +# crash. The bigobj COFF variant lifts that limit (same flag Bitcoin Core sets for the mingw host). +CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site CXXFLAGS="-DPTW32_STATIC_LIB -DCURL_STATICLIB -fopenmp -pthread -Wa,-mbig-obj" ./configure --prefix="${PREFIX}" --host=x86_64-w64-mingw32 --enable-static --disable-shared # Build CryptoConditions stuff WD=$PWD