git.iko.soy/typeable/nixpkgs
on master help sign in
boehm-gc: Fix build on MinGW with mcfgthreads

CC @lhmouse

commite00237e79086b6187c019a4d88f1eec2014972b4 authorJohn Ericson <git@JohnEricson.me> dateMon 11 Nov 2019, 13:53 (7 years ago) parent89ec69e
2 files changed+18−1
pkgs/development/libraries/boehm-gc/default.nix+7−1 pkgs/development/libraries/boehm-gc/mcfgthread.patch+11
pkgs/development/libraries/boehm-gc/default.nix+7−1
@@ -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;
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 \