summary refs log tree commit diff
path: root/pkgs/development/libraries/boehm-gc/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-11-11 13:53:02 -0500
committerJohn Ericson <git@JohnEricson.me>2019-11-11 14:10:01 -0500
commite00237e79086b6187c019a4d88f1eec2014972b4 (patch)
treea1a09a4690a51aa75f6b8fb8d9c66f481a08f151 /pkgs/development/libraries/boehm-gc/default.nix
parent89ec69e25eec35b64e8fd384e3ff0ef53a419cbb (diff)
downloadnixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.tar
nixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.tar.gz
nixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.tar.bz2
nixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.tar.lz
nixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.tar.xz
nixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.tar.zst
nixpkgs-e00237e79086b6187c019a4d88f1eec2014972b4.zip
boehm-gc: Fix build on MinGW with mcfgthreads
CC @lhmouse
Diffstat (limited to 'pkgs/development/libraries/boehm-gc/default.nix')
-rw-r--r--pkgs/development/libraries/boehm-gc/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix
index cf76d9e7d24..f03a1385cf3 100644
--- a/pkgs/development/libraries/boehm-gc/default.nix
+++ b/pkgs/development/libraries/boehm-gc/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, fetchurl
+, autoreconfHook
 , enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179
 }:
 
@@ -23,13 +24,18 @@ stdenv.mkDerivation rec {
 
   patches =
     # https://github.com/ivmai/bdwgc/pull/208
-    lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch;
+    lib.optional stdenv.hostPlatform.isRiscV ./riscv.patch
+    # boehm-gc whitelists GCC threading models
+    ++ lib.optional stdenv.hostPlatform.isMinGW ./mcfgthread.patch;
 
   configureFlags =
     [ "--enable-cplusplus" "--with-libatomic-ops=none" ]
     ++ lib.optional enableLargeConfig "--enable-large-config"
     ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static";
 
+  nativeBuildInputs =
+    lib.optional stdenv.hostPlatform.isMinGW autoreconfHook;
+
   doCheck = true; # not cross;
 
   enableParallelBuilding = true;