mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
Merge pull request #20929 from nathan7/boehm-7.6.0
boehm-gc: 7.2g -> 7.6.0
This commit is contained in:
commit
5d4740fded
2 changed files with 7 additions and 113 deletions
|
@ -1,108 +0,0 @@
|
|||
--- gc-7.2/include/gc.h 2014-06-01 19:00:48.000000000 +0200
|
||||
+++ gc-7.2/include/gc.h 2015-05-27 12:55:42.248984200 +0200
|
||||
@@ -1386,7 +1386,14 @@
|
||||
/* THREAD_LOCAL_ALLOC defined and the initial allocation call is not */
|
||||
/* to GC_malloc() or GC_malloc_atomic(). */
|
||||
|
||||
-#ifdef __CYGWIN32__
|
||||
+#ifdef __CYGWIN__
|
||||
+#ifdef __x86_64__
|
||||
+ extern int __data_start__[], __data_end__[], __bss_start__[], __bss_end__[];
|
||||
+#define GC_DATASTART (__data_start__ < __bss_start__ ?\
|
||||
+ (void *)__data_start__ : (void *)__bss_start__)
|
||||
+#define GC_DATAEND (__data_end__ < __bss_end__ ?\
|
||||
+ (void *)__data_end__ : (void *)__bss_end__)
|
||||
+#else
|
||||
/* Similarly gnu-win32 DLLs need explicit initialization from the */
|
||||
/* main program, as does AIX. */
|
||||
extern int _data_start__[], _data_end__[], _bss_start__[], _bss_end__[];
|
||||
@@ -1394,6 +1401,7 @@
|
||||
(void *)_data_start__ : (void *)_bss_start__)
|
||||
# define GC_DATAEND (_data_end__ > _bss_end__ ? \
|
||||
(void *)_data_end__ : (void *)_bss_end__)
|
||||
+#endif
|
||||
# define GC_INIT_CONF_ROOTS GC_add_roots(GC_DATASTART, GC_DATAEND); \
|
||||
GC_gcollect() /* For blacklisting. */
|
||||
/* Required at least if GC is in a DLL. And doesn't hurt. */
|
||||
--- gc-7.2/include/private/gcconfig.h 2014-06-01 19:00:48.000000000 +0200
|
||||
+++ gc-7.2/include/private/gcconfig.h 2015-05-27 12:46:01.864338700 +0200
|
||||
@@ -441,10 +441,20 @@
|
||||
# endif
|
||||
# define mach_type_known
|
||||
# endif
|
||||
-# if defined(__CYGWIN32__) || defined(__CYGWIN__)
|
||||
+# if defined(__CYGWIN32__)
|
||||
# define I386
|
||||
# define CYGWIN32
|
||||
# define mach_type_known
|
||||
+#if defined(__CYGWIN__)
|
||||
+# if defined(__LP64__)
|
||||
+# define X86_64
|
||||
+# define mach_type_known
|
||||
+# else
|
||||
+# define I386
|
||||
+# endif
|
||||
+# define CYGWIN32
|
||||
+# define mach_type_known
|
||||
+#endif
|
||||
# endif
|
||||
# if defined(__MINGW32__) && !defined(mach_type_known)
|
||||
# define I386
|
||||
@@ -511,6 +521,16 @@
|
||||
# define mach_type_known
|
||||
# endif
|
||||
|
||||
+#if defined(__CYGWIN__)
|
||||
+# if defined(__LP64__)
|
||||
+# define X86_64
|
||||
+# define mach_type_known
|
||||
+# else
|
||||
+# define I386
|
||||
+# endif
|
||||
+# define CYGWIN32
|
||||
+# define mach_type_known
|
||||
+#endif
|
||||
/* Feel free to add more clauses here */
|
||||
|
||||
/* Or manually define the machine type here. A machine type is */
|
||||
@@ -2279,6 +2299,20 @@
|
||||
# define GWW_VDB
|
||||
# define DATAEND /* not needed */
|
||||
# endif
|
||||
+
|
||||
+# ifdef CYGWIN32
|
||||
+# define OS_TYPE "CYGWIN32"
|
||||
+# define DATASTART ((ptr_t)GC_DATASTART) /* From gc.h */
|
||||
+# define DATAEND ((ptr_t)GC_DATAEND)
|
||||
+# define ALIGNMENT 8
|
||||
+# undef STACK_GRAN
|
||||
+# define STACK_GRAN 0x10000
|
||||
+# ifdef USE_MMAP
|
||||
+# define NEED_FIND_LIMIT
|
||||
+# define USE_MMAP_ANON
|
||||
+# endif
|
||||
+# endif
|
||||
+
|
||||
# endif /* X86_64 */
|
||||
|
||||
# ifdef HEXAGON
|
||||
--- gc-7.2/os_dep.c 2015-05-27 12:25:29.097698800 +0200
|
||||
+++ gc-7.2/os_dep.c 2015-05-27 12:48:23.714600800 +0200
|
||||
@@ -764,10 +764,16 @@
|
||||
/* gcc version of boehm-gc). */
|
||||
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *sb)
|
||||
{
|
||||
+# ifdef __x86_64__
|
||||
+ PNT_TIB pTib = NtCurrentTeb();
|
||||
+ void * _tlsbase = pTib->StackBase;
|
||||
+ /*void * _tlsbase = NtCurrentTeb()->pTib.StackBase;*/
|
||||
+ /*extern void * _tlsbase __asm__ ("%gs:8");*/
|
||||
+# else
|
||||
void * _tlsbase;
|
||||
-
|
||||
__asm__ ("movl %%fs:4, %0"
|
||||
: "=r" (_tlsbase));
|
||||
+# endif
|
||||
sb -> mem_base = _tlsbase;
|
||||
return GC_SUCCESS;
|
||||
}
|
|
@ -1,13 +1,15 @@
|
|||
{ lib, stdenv, fetchurl, enableLargeConfig ? false }:
|
||||
{ lib, stdenv, fetchurl, pkgconfig, libatomic_ops, enableLargeConfig ? false }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "boehm-gc-7.2g";
|
||||
name = "boehm-gc-7.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.hboehm.info/gc/gc_source/gc-7.2g.tar.gz;
|
||||
sha256 = "0bvw6cc555qg5b7dgcqy3ryiw0wir79dqy0glff3hjmyy7i2jkjq";
|
||||
url = http://www.hboehm.info/gc/gc_source/gc-7.6.0.tar.gz;
|
||||
sha256 = "143x7g0d0k6250ai6m2x3l4y352mzizi4wbgrmahxscv2aqjhjm1";
|
||||
};
|
||||
patches = if stdenv.isCygwin then [ ./cygwin.patch ] else null;
|
||||
|
||||
buildInputs = [ libatomic_ops ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
outputs = [ "out" "dev" "doc" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue