git.iko.soy/typeable/nixpkgs
on master help sign in
boehm-gc: Fix build on MinGW with mcfgthreads
e00237eJohn Ericson
pkgs/development/libraries/boehm-gc/default.nix+7−1
@@ -1,4 +1,5 @@
1{ lib, stdenv, fetchurl
1{ lib, stdenv, fetchurl
2+, autoreconfHook
2, enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179
3, enableLargeConfig ? false # doc: https://github.com/ivmai/bdwgc/blob/v7.6.6/doc/README.macros#L179
3}:
4}:
4
5
@@ -23,13 +24,18 @@ stdenv.mkDerivation rec {
23
24
24 patches =
25 patches =
25 # https://github.com/ivmai/bdwgc/pull/208
26 # 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;
27
30
28 configureFlags =
31 configureFlags =
29 [ "--enable-cplusplus" "--with-libatomic-ops=none" ]
32 [ "--enable-cplusplus" "--with-libatomic-ops=none" ]
30 ++ lib.optional enableLargeConfig "--enable-large-config"
33 ++ lib.optional enableLargeConfig "--enable-large-config"
31 ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static";
34 ++ lib.optional (stdenv.hostPlatform.libc == "musl") "--disable-static";
32
35
36+ nativeBuildInputs =
37+ lib.optional stdenv.hostPlatform.isMinGW autoreconfHook;
38+
33 doCheck = true; # not cross;
39 doCheck = true; # not cross;
34
40
35 enableParallelBuilding = true;
41 enableParallelBuilding = true;
pkgs/development/libraries/boehm-gc/mcfgthread.patchnew file+11
@@ -0,0 +1,11 @@
1+--- a/configure.ac
2++++ b/configure.ac
3+@@ -277,7 +277,7 @@ case "$THREADS" in
4+ ;;
5+ esac
6+ ;;
7+- win32)
8++ win32 | mcf)
9+ AC_DEFINE(GC_THREADS)
10+ use_parallel_mark=$enable_parallel_mark
11+ if test "${enable_parallel_mark}" != no \