diff options
author | John Ericson <git@JohnEricson.me> | 2019-11-11 13:53:02 -0500 |
---|---|---|
committer | John Ericson <git@JohnEricson.me> | 2019-11-11 14:10:01 -0500 |
commit | e00237e79086b6187c019a4d88f1eec2014972b4 (patch) | |
tree | a1a09a4690a51aa75f6b8fb8d9c66f481a08f151 | |
parent | 89ec69e25eec35b64e8fd384e3ff0ef53a419cbb (diff) | |
download | nixpkgs-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
-rw-r--r-- | pkgs/development/libraries/boehm-gc/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/boehm-gc/mcfgthread.patch | 11 |
2 files changed, 18 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; diff --git a/pkgs/development/libraries/boehm-gc/mcfgthread.patch b/pkgs/development/libraries/boehm-gc/mcfgthread.patch new file mode 100644 index 00000000000..c4aa996aebd --- /dev/null +++ b/pkgs/development/libraries/boehm-gc/mcfgthread.patch @@ -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 \ |