@@ -1,4 +1,5 @@
11{ lib, stdenv, fetchurl
2+, autoreconfHook
23, enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179
34}:
45
@@ -23,13 +24,18 @@ stdenv.mkDerivation rec {
2324
2425 patches =
2526 # https://github.com/ivmai/bdwgc/pull/208
26− lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch;
27+ lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch
28+ # boehm-gc whitelists GCC threading models
29+ ++ lib.optional stdenv.hostPlatform.isMinGW ./mcfgthread.patch;
2730
2831 configureFlags =
2932 [ "--enable-cplusplus" "--with-libatomic-ops=none" ]
3033 ++ lib.optional enableLargeConfig "--enable-large-config"
3134 ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static";
3235
36+ nativeBuildInputs =
37+ lib.optional stdenv.hostPlatform.isMinGW autoreconfHook;
38+
3339 doCheck = true; # not cross;
3440
3541 enableParallelBuilding = true;