From 6da7b1e0eaae2054436672619602317dfa1d1d1a Mon Sep 17 00:00:00 2001 From: gdt Date: Sun, 18 Apr 2010 00:31:55 +0000 Subject: Enhance gc_os_dep.c patch for Solaris. From Marion Hakanson on pkgsrc-users. --- lang/guile/Makefile | 4 +- lang/guile/distinfo | 4 +- lang/guile/patches/patch-ae | 94 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 92 insertions(+), 10 deletions(-) (limited to 'lang') diff --git a/lang/guile/Makefile b/lang/guile/Makefile index 6129d28927a..d0f90abab3a 100644 --- a/lang/guile/Makefile +++ b/lang/guile/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.94 2010/03/24 19:43:25 asau Exp $ +# $NetBSD: Makefile,v 1.95 2010/04/18 00:31:55 gdt Exp $ DISTNAME= guile-1.8.7 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_GNU:=guile/} diff --git a/lang/guile/distinfo b/lang/guile/distinfo index fad8f52e55c..b805b1e37bb 100644 --- a/lang/guile/distinfo +++ b/lang/guile/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.42 2009/08/16 14:00:50 wiz Exp $ +$NetBSD: distinfo,v 1.43 2010/04/18 00:31:55 gdt Exp $ SHA1 (guile-1.8.7.tar.gz) = 24cd2f06439c76d41d982a7384fe8a0fe5313b54 RMD160 (guile-1.8.7.tar.gz) = 3ccd581cff4ad743fc1328597bd8cb241cbd3fd6 Size (guile-1.8.7.tar.gz) = 4026804 bytes -SHA1 (patch-ae) = c3e5065408082978df5b6ddd62e47dda8ab41f40 +SHA1 (patch-ae) = 8c80dc1eadc069b3123891a4d144cd2b03df07f8 SHA1 (patch-ag) = 8aeb781ba43597f37b1ce4aaa2fb0baba2e4ce9c SHA1 (patch-ah) = 351136075aaaab96117fecc7cedc8ee989d8a1e0 SHA1 (patch-ak) = 6639ea95471a76893b0b074dcbfbd139a1571309 diff --git a/lang/guile/patches/patch-ae b/lang/guile/patches/patch-ae index 41b1316606a..c6f558b4c18 100644 --- a/lang/guile/patches/patch-ae +++ b/lang/guile/patches/patch-ae @@ -1,8 +1,6 @@ -$NetBSD: patch-ae,v 1.14 2008/02/19 23:33:35 gdt Exp $ - -support for NetBSD/alpha, NetBSD/sparc64, and NetBSD/x86_64 - ---- libguile/gc_os_dep.c.orig 2008-02-16 13:50:24.000000000 -0500 +--- libguile/gc_os_dep.c.orig Fri Jun 26 13:21:44 2009 ++++ libguile/gc_os_dep.c Sat Apr 17 13:35:43 2010 +--- libguile/gc_os_dep.c.orig 2009-06-26 20:21:44.000000000 +0000 +++ libguile/gc_os_dep.c @@ -132,7 +132,7 @@ typedef int GC_bool; # define NETBSD @@ -41,7 +39,91 @@ support for NetBSD/alpha, NetBSD/sparc64, and NetBSD/x86_64 * * MACH_TYPE is a string representation of the machine type. * OS_TYPE is analogous for the OS. -@@ -994,6 +999,21 @@ scm_get_stack_base () +@@ -706,13 +711,17 @@ scm_get_stack_base () + extern int etext; + # ifdef SUNOS5 + # define OS_TYPE "SUNOS5" +- extern int _etext; +- extern int _end; +- extern char * GC_SysVGetDataStart(); +-# define DATASTART (ptr_t)GC_SysVGetDataStart(0x10000, &_etext) +-# define DATAEND (&_end) +-# ifndef USE_MMAP ++ extern int _etext[]; ++ extern int _end[]; ++ extern ptr_t GC_SysVGetDataStart(); ++# define DATASTART GC_SysVGetDataStart(0x10000, _etext) ++# define DATAEND (_end) ++# if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) + # define USE_MMAP ++ /* Otherwise we now use calloc. Mmap may result in the */ ++ /* heap interleaved with thread stacks, which can result in */ ++ /* excessive blacklisting. Sbrk is unusable since it */ ++ /* doesn't interact correctly with the system malloc. */ + # endif + # ifdef USE_MMAP + # define HEAP_START (ptr_t)0x40000000 +@@ -720,10 +729,18 @@ scm_get_stack_base () + # define HEAP_START DATAEND + # endif + # define PROC_VDB +-/* HEURISTIC1 reportedly no longer works under 2.7. Thus we */ +-/* switched to HEURISTIC2, eventhough it creates some debugging */ +-/* issues. */ +-# define HEURISTIC2 ++/* HEURISTIC1 reportedly no longer works under 2.7. */ ++/* HEURISTIC2 probably works, but this appears to be preferable. */ ++/* Apparently USRSTACK is defined to be USERLIMIT, but in some */ ++/* installations that's undefined. We work around this with a */ ++/* gross hack: */ ++# include ++# ifdef USERLIMIT ++ /* This should work everywhere, but doesn't. */ ++# define STACKBOTTOM USRSTACK ++# else ++# define HEURISTIC2 ++# endif + # include + # define GETPAGESIZE() sysconf(_SC_PAGESIZE) + /* getpagesize() appeared to be missing from at least one */ +@@ -797,15 +814,29 @@ scm_get_stack_base () + # endif + # ifdef SUNOS5 + # define OS_TYPE "SUNOS5" +- extern int etext, _start; +- extern char * GC_SysVGetDataStart(); +-# define DATASTART GC_SysVGetDataStart(0x1000, &etext) +-# define STACKBOTTOM ((ptr_t)(&_start)) +-/** At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */ +-/*# define PROC_VDB*/ ++ extern int _etext[], _end[]; ++ extern ptr_t GC_SysVGetDataStart(); ++# define DATASTART GC_SysVGetDataStart(0x1000, _etext) ++# define DATAEND (_end) ++/* # define STACKBOTTOM ((ptr_t)(_start)) worked through 2.7, */ ++/* but reportedly breaks under 2.8. It appears that the stack */ ++/* base is a property of the executable, so this should not break */ ++/* old executables. */ ++/* HEURISTIC2 probably works, but this appears to be preferable. */ ++# include ++# define STACKBOTTOM USRSTACK ++/* At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */ ++/* It appears to be fixed in 2.8 and 2.9. */ ++# ifdef SOLARIS25_PROC_VDB_BUG_FIXED ++# define PROC_VDB ++# endif + # define DYNAMIC_LOADING +-# ifndef USE_MMAP ++# if !defined(USE_MMAP) && defined(REDIRECT_MALLOC) + # define USE_MMAP ++ /* Otherwise we now use calloc. Mmap may result in the */ ++ /* heap interleaved with thread stacks, which can result in */ ++ /* excessive blacklisting. Sbrk is unusable since it */ ++ /* doesn't interact correctly with the system malloc. */ + # endif + # ifdef USE_MMAP + # define HEAP_START (ptr_t)0x40000000 +@@ -994,6 +1025,21 @@ scm_get_stack_base () # endif # endif -- cgit v1.2.3