about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2022-11-14 10:31:43 -0300
committerGitHub <noreply@github.com>2022-11-14 10:31:43 -0300
commitd8b143d43c3ed3f00cb1ccd0f0c9ae3ef12089a0 (patch)
tree332f952e52eeb02ab96caface597ad4f05cefb77
parent5bc1b01a403e071500a3b0659364fb6ee20391e1 (diff)
parent7343a3b642cbdbac47770fe24d65aa9f9d23e6fa (diff)
Merge pull request #199978 from amjoseph-nixpkgs/pr/boehmgc/powerpc64le
boehmgc: disable SOFT_VDB on powerpc64le for version 8.2.2
-rw-r--r--pkgs/development/libraries/boehm-gc/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix
index 513ae50298e26..34e26f5470937 100644
--- a/pkgs/development/libraries/boehm-gc/default.nix
+++ b/pkgs/development/libraries/boehm-gc/default.nix
@@ -30,6 +30,21 @@ stdenv.mkDerivation (finalAttrs: {
   ++ lib.optional enableMmap "--enable-mmap"
   ++ lib.optional enableLargeConfig "--enable-large-config";
 
+  # This stanza can be dropped when a release fixes this issue:
+  #   https://github.com/ivmai/bdwgc/issues/376
+  # The version is checked with == instead of versionAtLeast so we
+  # don't forget to disable the fix (and if the next release does
+  # not fix the problem the test failure will be a reminder to
+  # extend the set of versions requiring the workaround).
+  makeFlags = if (stdenv.hostPlatform.isPower64 &&
+                  finalAttrs.version == "8.2.2")
+    then [
+      # do not use /proc primitives to track dirty bits; see:
+      # https://github.com/ivmai/bdwgc/issues/479#issuecomment-1279687537
+      # https://github.com/ivmai/bdwgc/blob/54522af853de28f45195044dadfd795c4e5942aa/include/private/gcconfig.h#L741
+      "CFLAGS_EXTRA=-DNO_SOFT_VDB"
+    ] else null;
+
   # `gctest` fails under emulation on aarch64-darwin
   doCheck = !(stdenv.isDarwin && stdenv.isx86_64);