Merge pull request #189020 from ivmai/update-libgc-8_2_2
boehmgc: 8.0.6 -> 8.2.2
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 \
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user