From 992773b898176baeb4934e90718ed3c61f7e4674 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 30 Aug 2022 09:39:09 +0300 Subject: [PATCH 1/2] boehmgc: 8.0.6 -> 8.2.2 https://github.com/ivmai/bdwgc/releases/tag/v8.2.2 Drop mcfgthread.patch (upstreamed). --- pkgs/development/libraries/boehm-gc/default.nix | 13 ++++--------- .../development/libraries/boehm-gc/mcfgthread.patch | 11 ----------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 pkgs/development/libraries/boehm-gc/mcfgthread.patch diff --git a/pkgs/development/libraries/boehm-gc/default.nix b/pkgs/development/libraries/boehm-gc/default.nix index 1e74ddfc721e..2e1c0010f512 100644 --- a/pkgs/development/libraries/boehm-gc/default.nix +++ b/pkgs/development/libraries/boehm-gc/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchurl , autoreconfHook -# doc: https://github.com/ivmai/bdwgc/blob/v8.0.6/doc/README.macros (LARGE_CONFIG) +# doc: https://github.com/ivmai/bdwgc/blob/v8.2.2/doc/README.macros (LARGE_CONFIG) , enableLargeConfig ? false , enableMmap ? true , nixVersions @@ -10,22 +10,19 @@ stdenv.mkDerivation (finalAttrs: { pname = "boehm-gc"; - version = "8.0.6"; + version = "8.2.2"; src = fetchurl { urls = [ - "https://www.hboehm.info/gc/gc_source/gc-${finalAttrs.version}.tar.gz" + # "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-O0kUq8n6dlk1lnc+TaZx1+1NU5Dj1G+/Ll8VXhIb6hE="; + sha256 = "sha256-8wEHvLBi4JIKeQ//+lbZUSNIVGhZNkwjoUviZLOINqA="; }; outputs = [ "out" "dev" "doc" ]; separateDebugInfo = stdenv.isLinux && stdenv.hostPlatform.libc != "musl"; - # boehm-gc whitelists GCC threading models - patches = lib.optional stdenv.hostPlatform.isMinGW ./mcfgthread.patch; - configureFlags = [ "--enable-cplusplus" "--with-libatomic-ops=none" @@ -33,8 +30,6 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optional enableMmap "--enable-mmap" ++ lib.optional enableLargeConfig "--enable-large-config"; - nativeBuildInputs = lib.optional stdenv.hostPlatform.isMinGW autoreconfHook; - doCheck = true; enableParallelBuilding = true; diff --git a/pkgs/development/libraries/boehm-gc/mcfgthread.patch b/pkgs/development/libraries/boehm-gc/mcfgthread.patch deleted file mode 100644 index c4aa996aebd7..000000000000 --- a/pkgs/development/libraries/boehm-gc/mcfgthread.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 \ From 190a5fe56d08fe1474d3975f6c07dbede3d0a6d3 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 31 Aug 2022 11:26:55 +0200 Subject: [PATCH 2/2] nix/boehmgc: Rebase patch --- .../boehmgc-coroutine-sp-fallback.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 e659bf470d39..e4e2b3858ad5 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,17 +1,17 @@ diff --git a/pthread_stop_world.c b/pthread_stop_world.c -index 4b2c429..1fb4c52 100644 +index b5d71e62..aed7b0bf 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c -@@ -673,6 +673,8 @@ GC_INNER void GC_push_all_stacks(void) - struct GC_traced_stack_sect_s *traced_stack_sect; - pthread_t self = pthread_self(); - word total_size = 0; +@@ -768,6 +768,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) + { + size_t stack_limit; + pthread_attr_t pattr; - - if (!EXPECT(GC_thr_initialized, TRUE)) - GC_thr_init(); -@@ -722,6 +724,31 @@ GC_INNER void GC_push_all_stacks(void) + 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; /* FIXME: Need to scan the normal stack too, but how ? */ /* FIXME: Assume stack grows down */