about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-01-31 13:46:14 +0100
committerGitHub <noreply@github.com>2024-01-31 13:46:14 +0100
commit4a70bf9d73b0a5df41af223a0b60cf1158062383 (patch)
tree3f38a522f14814d7b4b40dbb79f940471b6d2cbc /pkgs
parent50adc5a275dee57e8b3599c0b2f325e7eb009321 (diff)
parentb2d0641e340334994ffc1cc455ab8d82a5ffb13d (diff)
downloadnixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.tar
nixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.tar.gz
nixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.tar.bz2
nixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.tar.lz
nixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.tar.xz
nixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.tar.zst
nixlib-4a70bf9d73b0a5df41af223a0b60cf1158062383.zip
Merge pull request #268486 from panicgh/boehmgc
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/boehm-gc/default.nix24
-rw-r--r--pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch14
2 files changed, 21 insertions, 17 deletions
diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix
index e37eb26deb38..6da88ee8258f 100644
--- a/pkgs/development/libraries/boehm-gc/default.nix
+++ b/pkgs/development/libraries/boehm-gc/default.nix
@@ -1,7 +1,8 @@
 { lib
 , stdenv
-, fetchurl
-# doc: https://github.com/ivmai/bdwgc/blob/v8.2.2/doc/README.macros (LARGE_CONFIG)
+, fetchFromGitHub
+, autoreconfHook
+# doc: https://github.com/ivmai/bdwgc/blob/v8.2.4/doc/README.macros (LARGE_CONFIG)
 , enableLargeConfig ? false
 , enableMmap ? true
 , enableStatic ? false
@@ -10,19 +11,22 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "boehm-gc";
-  version = "8.2.2";
+  version = "8.2.4";
 
-  src = fetchurl {
-    urls = [
-      # "https://www.hboehm.info/gc/gc_source/gc-${finalAttrs.version}.tar.gz"
-      "https://github.com/ivmai/bdwgc/releases/download/v${finalAttrs.version}/gc-${finalAttrs.version}.tar.gz"
-    ];
-    sha256 = "sha256-8wEHvLBi4JIKeQ//+lbZUSNIVGhZNkwjoUviZLOINqA=";
+  src = fetchFromGitHub {
+    owner = "ivmai";
+    repo = "bdwgc";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-KHijT4BBKfDvTpHpwognN+3ZXoC6JabBTFSYFyOUT9o=";
   };
 
   outputs = [ "out" "dev" "doc" ];
   separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl";
 
+  nativeBuildInputs = [
+    autoreconfHook
+  ];
+
   configureFlags = [
     "--enable-cplusplus"
     "--with-libatomic-ops=none"
@@ -38,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
   # not fix the problem the test failure will be a reminder to
   # extend the set of versions requiring the workaround).
   makeFlags = lib.optionals (stdenv.hostPlatform.isPower64 &&
-                  finalAttrs.version == "8.2.2")
+                  finalAttrs.version == "8.2.4")
     [
       # do not use /proc primitives to track dirty bits; see:
       # https://github.com/ivmai/bdwgc/issues/479#issuecomment-1279687537
diff --git a/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch b/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch
index e4e2b3858ad5..578bd325d56b 100644
--- a/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch
+++ b/pkgs/tools/package-management/nix/patches/boehmgc-coroutine-sp-fallback.patch
@@ -1,8 +1,8 @@
 diff --git a/pthread_stop_world.c b/pthread_stop_world.c
-index b5d71e62..aed7b0bf 100644
+index 2b45489..0e6d8ef 100644
 --- a/pthread_stop_world.c
 +++ b/pthread_stop_world.c
-@@ -768,6 +768,8 @@ STATIC void GC_restart_handler(int sig)
+@@ -776,6 +776,8 @@ STATIC void GC_restart_handler(int sig)
  /* world is stopped.  Should not fail if it isn't.                      */
  GC_INNER void GC_push_all_stacks(void)
  {
@@ -11,10 +11,10 @@ index b5d71e62..aed7b0bf 100644
      GC_bool found_me = FALSE;
      size_t nthreads = 0;
      int i;
-@@ -851,6 +853,31 @@ GC_INNER void GC_push_all_stacks(void)
-           hi = p->altstack + p->altstack_size;
+@@ -868,6 +870,31 @@ GC_INNER void GC_push_all_stacks(void)
+             hi = p->altstack + p->altstack_size;
+ #         endif
            /* FIXME: Need to scan the normal stack too, but how ? */
-           /* FIXME: Assume stack grows down */
 +        } else {
 +          if (pthread_getattr_np(p->id, &pattr)) {
 +            ABORT("GC_push_all_stacks: pthread_getattr_np failed!");
@@ -41,5 +41,5 @@ index b5d71e62..aed7b0bf 100644
 +          #error "STACK_GROWS_UP not supported in boost_coroutine2 (as of june 2021), so we don't support it in Nix."
 +          #endif
          }
-         GC_push_all_stack_sections(lo, hi, traced_stack_sect);
- #       ifdef STACK_GROWS_UP
+ #       ifdef STACKPTR_CORRECTOR_AVAILABLE
+           if (GC_sp_corrector != 0)