boehm-gc: Fix build on MinGW with mcfgthreads

CC @lhmouse
This commit is contained in:
John Ericson 2019-11-11 13:53:02 -05:00
parent 89ec69e25e
commit e00237e790
2 changed files with 18 additions and 1 deletions

View File

@ -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;

View File

@ -0,0 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
@@ -277,7 +277,7 @@ case "$THREADS" in
;;
esac
;;
- win32)
+ win32 | mcf)
AC_DEFINE(GC_THREADS)
use_parallel_mark=$enable_parallel_mark
if test "${enable_parallel_mark}" != no \