head 1.16; access; symbols pkgsrc-2013Q2:1.16.0.4 pkgsrc-2013Q2-base:1.16 pkgsrc-2012Q4:1.16.0.2 pkgsrc-2012Q4-base:1.16 pkgsrc-2012Q2:1.15.0.2 pkgsrc-2012Q2-base:1.15 pkgsrc-2012Q1:1.14.0.20 pkgsrc-2012Q1-base:1.14 pkgsrc-2011Q4:1.14.0.18 pkgsrc-2011Q4-base:1.14 pkgsrc-2011Q3:1.14.0.16 pkgsrc-2011Q3-base:1.14 pkgsrc-2011Q2:1.14.0.14 pkgsrc-2011Q2-base:1.14 pkgsrc-2011Q1:1.14.0.12 pkgsrc-2011Q1-base:1.14 pkgsrc-2010Q4:1.14.0.10 pkgsrc-2010Q4-base:1.14 pkgsrc-2010Q3:1.14.0.8 pkgsrc-2010Q3-base:1.14 pkgsrc-2010Q2:1.14.0.6 pkgsrc-2010Q2-base:1.14 pkgsrc-2010Q1:1.14.0.4 pkgsrc-2010Q1-base:1.14 pkgsrc-2009Q4:1.14.0.2 pkgsrc-2009Q4-base:1.14 pkgsrc-2008Q4:1.12.0.8 pkgsrc-2008Q4-base:1.12 pkgsrc-2008Q3:1.12.0.6 pkgsrc-2008Q3-base:1.12 cube-native-xorg:1.12.0.4 cube-native-xorg-base:1.12 pkgsrc-2008Q2:1.12.0.2 pkgsrc-2008Q2-base:1.12 pkgsrc-2008Q1:1.11.0.30 pkgsrc-2008Q1-base:1.11 pkgsrc-2007Q4:1.11.0.28 pkgsrc-2007Q4-base:1.11 pkgsrc-2007Q3:1.11.0.26 pkgsrc-2007Q3-base:1.11 pkgsrc-2007Q2:1.11.0.24 pkgsrc-2007Q2-base:1.11 pkgsrc-2007Q1:1.11.0.22 pkgsrc-2007Q1-base:1.11 pkgsrc-2006Q4:1.11.0.20 pkgsrc-2006Q4-base:1.11 pkgsrc-2006Q3:1.11.0.18 pkgsrc-2006Q3-base:1.11 pkgsrc-2006Q2:1.11.0.16 pkgsrc-2006Q2-base:1.11 pkgsrc-2006Q1:1.11.0.14 pkgsrc-2006Q1-base:1.11 pkgsrc-2005Q4:1.11.0.12 pkgsrc-2005Q4-base:1.11 pkgsrc-2005Q3:1.11.0.10 pkgsrc-2005Q3-base:1.11 pkgsrc-2005Q2:1.11.0.8 pkgsrc-2005Q2-base:1.11 pkgsrc-2005Q1:1.11.0.6 pkgsrc-2005Q1-base:1.11 pkgsrc-2004Q4:1.11.0.4 pkgsrc-2004Q4-base:1.11 pkgsrc-2004Q3:1.11.0.2 pkgsrc-2004Q3-base:1.11 pkgsrc-2004Q2:1.10.0.14 pkgsrc-2004Q2-base:1.10 pkgsrc-2004Q1:1.10.0.12 pkgsrc-2004Q1-base:1.10 pkgsrc-2003Q4:1.10.0.10 pkgsrc-2003Q4-base:1.10 netbsd-1-6-1:1.10.0.6 netbsd-1-6-1-base:1.10 netbsd-1-6:1.10.0.8 netbsd-1-6-RELEASE-base:1.10 pkgviews:1.10.0.4 pkgviews-base:1.10 buildlink2:1.10.0.2 buildlink2-base:1.10 netbsd-1-5-PATCH003:1.10 netbsd-1-5-PATCH001:1.9 netbsd-1-5-RELEASE:1.8 netbsd-1-4-PATCH003:1.8 netbsd-1-4-PATCH002:1.4 comdex-fall-1999:1.2 netbsd-1-4-PATCH001:1.1 netbsd-1-4-RELEASE:1.1 netbsd-1-3-PATCH003:1.1; locks; strict; comment @# @; 1.16 date 2012.07.01.14.09.45; author wiz; state dead; branches; next 1.15; 1.15 date 2012.05.29.03.01.15; author enami; state Exp; branches; next 1.14; 1.14 date 2009.11.10.23.31.36; author asau; state Exp; branches; next 1.13; 1.13 date 2009.11.10.18.35.13; author wiz; state Exp; branches; next 1.12; 1.12 date 2008.05.21.13.47.25; author wiz; state dead; branches; next 1.11; 1.11 date 2004.07.09.00.18.54; author recht; state Exp; branches; next 1.10; 1.10 date 2001.09.08.00.36.10; author kei; state Exp; branches; next 1.9; 1.9 date 2000.11.16.10.42.24; author abs; state Exp; branches; next 1.8; 1.8 date 2000.07.25.05.58.27; author jlam; state Exp; branches; next 1.7; 1.7 date 2000.07.25.00.46.58; author jlam; state Exp; branches; next 1.6; 1.6 date 2000.06.20.21.50.20; author jlam; state Exp; branches; next 1.5; 1.5 date 2000.06.20.21.47.22; author jlam; state Exp; branches; next 1.4; 1.4 date 99.12.28.14.07.43; author minoura; state Exp; branches; next 1.3; 1.3 date 99.11.04.15.21.58; author minoura; state Exp; branches; next 1.2; 1.2 date 99.09.24.16.42.06; author jlam; state Exp; branches; next 1.1; 1.1 date 98.09.06.16.06.58; author christos; state Exp; branches; next ; desc @@ 1.16 log @Update to 7.2c: The results of GC_MALLOC_ATOMIC, GC_get_maps, and GC_scratch_alloc are now properly checked, avoiding segmentation faults. Several private symbols have been made externally visible to aid third party software which unfortunately relies on them. Minor NetBSD issues have been resolved. @ text @$NetBSD: patch-ac,v 1.15 2012/05/29 03:01:15 enami Exp $ --- dyn_load.c.orig 2007-12-19 02:37:12.000000000 +0300 +++ dyn_load.c 2009-11-11 01:54:26.000000000 +0300 @@@@ -78,6 +78,8 @@@@ #endif #if defined(NETBSD) +# include +# include # include # define ELFSIZE ARCH_ELFSIZE #endif @@@@ -499,6 +501,15 @@@@ return(0); } if( cachedResult == 0 ) { +#if defined(NETBSD) && defined(RTLD_DI_LINKMAP) + struct link_map *lm = NULL; + int rv = dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &lm); + if (rv != 0) + return (0); + if (lm == NULL) + return (0); + cachedResult = lm; +#else /* !(defined(NETBSD) && defined(RTLD_DI_LINKMAP)) */ int tag; for( dp = _DYNAMIC; (tag = dp->d_tag) != 0; dp++ ) { if( tag == DT_DEBUG ) { @@@@ -508,6 +519,7 @@@@ break; } } +#endif /* !(defined(NETBSD) && defined(RTLD_DI_LINKMAP)) */ } return cachedResult; } @ 1.15 log @Fix comment after #endif directive so that it matches other directives, before sending this patch to upstream. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.14 2009/11/10 23:31:36 asau Exp $ @ 1.14 log @Test for RTLD_DI_LINKMAP feature presence rather than for OS version. Suggested by Tobias Nygren in private talk. No revision change. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.13 2009/11/10 18:35:13 wiz Exp $ d34 1 a34 1 +#endif /* !(defined(NETBSD) && __NetBSD_Version__ >= 599001900) */ @ 1.13 log @Fix binary on NetBSD versions using binutils-2.19. Patch from enami@@ Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ d3 3 a5 3 --- dyn_load.c.orig 2007-12-18 23:37:12.000000000 +0000 +++ dyn_load.c @@@@ -78,6 +78,8 @@@@ static int (*GC_has_static_roots)(const d14 1 a14 1 @@@@ -499,6 +501,15 @@@@ GC_FirstDLOpenedLinkMap() d18 1 a18 1 +#if defined(NETBSD) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 599001900 d26 1 a26 1 +#else /* !(defined(NETBSD) && __NetBSD_Version__ >= 599001900) */ d30 1 a30 1 @@@@ -508,6 +519,7 @@@@ GC_FirstDLOpenedLinkMap() @ 1.12 log @Update to 7.1. Extract from ChangeLog: * doc/gcinterface.html: Improve C++ interface documentation. * allchblk.c (GC_allochblk): Check for overflow during size rounding. * malloc.c: (free replacement) Fix caller address space check. * finalize.c (GC_grow_table): Dereference table in null-check. * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP, and refine assertions to handle huge unmergable blocks. * allchblk.c (GC_enough_large_bytes_left): No longer take parameters; return free list index bound. (GC_merge_unmapped): Don't access nexthdr until after null test. (Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate when splitting is allowable only once here, not when considering each block. (GC_allchblk_nth): Accept new may_split parameter. Avoid some redundant tests for exact size matches. * alloc.c (GC_should_collect): Cache min_bytes_allocd. (GC_maybe_gc): Make locking assertion testable. * mark_rts.c: Fix indentation. * pthread_stop_world.c: Replace old GC_err_printf1 reference. * misc.c (GC_init_inner): Assert !GC_need_to_lock only when defined. (GC_call_with_stack_base): Add GC_API. * os_dep.c (GC_get_stack_base): Add GC_API. * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread): Add GC_API. * include/gc.h: Add GC_API annotations. * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for PCR. * include/private/gc_priv.h, mark_rts.c, typd_mlc.c: Add GC_push_typed_structures() to push GC_ext_descriptors. * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create blocks large enough that their size, when interpreted as a signed value, would be negative. * include/private/gc_priv.h: Update MAX_ROOT_SETS and LOG_PHT_ENTRIES to handle larger heaps. * allchblk.c, alloc.c, include/private/gc_priv.h: Track GC_bytes_dropped and use in GC triggering decisions. * alloc.c (min_bytes_allocd): Weight atomic blocks less. * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER adjusting p. * alloc.c: Define GC_version instead of in version.h. * version.h: Remove. * include/gc_version.h: Move most of version.h here. * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS, GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS. * alloc.c: Deal correctly with address wrapping for GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr. * finalize.c, include/gc.h (GC_register_disappearing_link, GC_register_finalizer_inner): Improve out-of-memory handling. * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro GC_GETSECTBYNAME instead. * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the architecture (Darwin). * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass granules, not bytes, to GC_FAST_MALLOC_GRANS. * include/gc.h: Never include gc_local_alloc.h. * malloc.c: Update GC_large_allocd_bytes on explicit deallocation. * allchblk.c: Sanity check GC_max_large_allocd_bytes. * include/extra/gc.h, include/extra/gc_cpp.h: New. * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include again. * dbg_mlc.c: Use random() on all glibc systems. * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on HURD. Add comment. * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accomodate systems without SA_SIGINFO. * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h: Maintain GC_our_memory and GC_n_memory. * dbg_mlc.c (GC_print_smashed_obj): Improve message. (GC_print_all_smashed_proc): Pass client object address instead of base. * dyn_load.c (sort_heap_sects): New. (GC_register_map_entries): Register sections that are contiguous and merged with our heap. * malloc.c, os_dep.c (GC_text_mapping): Check for just base name of libraries. * malloc.c (calloc): Check for special callers even with USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary malloc/free tracing. * misc.c: No longer call GC_init_lib_bounds explicitly. * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always initialize on demand. * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap() while world is still running. * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap() with world stopped. * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots. * misc.c (GC_init/GC_init_inner): Perform all work in GC_init_inner. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.11 2004/07/09 00:18:54 recht Exp $ d3 35 a37 60 --- doc/gc.man.in.orig 2004-03-23 01:36:15.000000000 +0100 +++ doc/gc.man.in 2004-04-04 14:13:02.000000000 +0200 @@@@ -11,7 +11,7 @@@@ void * GC_realloc(void *ptr, size_t size); .br .sp -cc ... gc.a +cc ... -lgc .LP .SH DESCRIPTION .I GC_malloc @@@@ -82,6 +82,48 @@@@ .LP Other facilities not discussed here include limited facilities to support incremental collection on machines without appropriate VM support, provisions for providing more explicit object layout information to the garbage collector, more direct support for ``weak'' pointers, support for ``abortable'' garbage collections during idle time, etc. .LP +.SH "PORT INFORMATION" +.LP +In this (BSD package) installation, +.I gc.h +and +.I gc_cpp.h +will be found in +.I @@PREFIX@@/include, +and the libraries in +.I @@PREFIX@@/lib. +.LP +These libraries have been compiled as drop-in replacements +for malloc and free (which is to say, all malloc +calls will allocate garbage-collectable data). +There is no need to include "gc.h" in your C files unless you want +access to the debugging (and other) functions defined there, +or unless you want to explicitly use +.I GC_malloc_uncollectable +for some allocations. +Just link against them whenever you want either garbage +collection or leak detection. +.LP +The C++ header file, "gc_cpp.h", +.I is +necessary for C++ programs, to obtain the appropriate +definitions of the +.I new +and +.I delete +operators. +The comments in both of these header files presently +provide far better documentation +for the package than this man page; +look there for more information. +.LP +Both libraries are compiled without (explicit) support +for the experimental +.I gc +extension of +.I g++. +This may or may not make a difference. +.LP .SH "SEE ALSO" The README and gc.h files in the distribution. More detailed definitions of the functions exported by the collector are given there. (The above list is not complete.) .LP @ 1.11 log @update to 6.3 This is mostly a bug fix release. Selection of changes: - most pkgsrc patches have been integrated - amd64 support for NetBSD/OpenBSD (thanks to drochner@@) - enhanced Darwin support For a complete list see: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/recent_changes @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.10 2001/09/08 00:36:10 kei Exp $ @ 1.10 log @updated to boehm-gc 6.0 (gc6.0) which incorporated most of our patch. On i386 aout/ELF, saprc ELF and macppc, 'cd ${WRKSRC}; make test' got success and www/w3m package which depends on this runs. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.9 2000/11/16 10:42:24 abs Exp $ d3 4 a6 4 --- doc/gc.man.in.orig Tue Sep 21 16:55:00 1999 +++ doc/gc.man.in @@@@ -9,7 +9,9 @@@@ ... malloc(...) ... a10 2 +.sp +cc ... -lleak d14 1 a14 2 @@@@ -67,6 +69,48 @@@@ This may temporarily write protect pages in the heap. See the README file for more information on how this interacts with system calls that write to the heap. d17 1 a17 1 +.LP d59 1 a59 1 .LP d62 1 @ 1.9 log @Fix compilation on arm32 by testing for __arm32__ not arm32 @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- gc.man.in.orig Tue Sep 21 16:55:00 1999 +++ gc.man.in @ 1.8 log @Use generic GC_push_regs() on mipsel (hpcmips) platforms. Patch applied from pkg/10674 by Hiroyuki Yanai . @ text @d3 62 a64 156 --- gcconfig.h.orig Tue Apr 25 20:41:01 2000 +++ gcconfig.h Tue Jul 25 01:54:06 2000 @@@@ -27,6 +27,11 @@@@ # define LINUX # endif +# if defined(__NetBSD__) +# define NETBSD +# define unix /* symbol unix is no longer defined in NetBSD */ +# endif + /* Determine the machine type: */ # if defined(sun) && defined(mc68000) # define M68K @@@@ -50,7 +55,10 @@@@ # endif # if defined(__NetBSD__) && defined(m68k) # define M68K -# define NETBSD +# define mach_type_known +# endif +# if defined(__NetBSD__) && defined(__powerpc__) +# define POWERPC # define mach_type_known # endif # if defined(__NetBSD__) && defined(arm32) @@@@ -81,6 +89,9 @@@@ # endif # endif # endif /* !LINUX */ +# if defined(__NetBSD__) && defined(__MIPSEL__) +# undef ULTRIX +# endif # define mach_type_known # endif # if defined(sequent) && defined(i386) @@@@ -114,7 +125,7 @@@@ # define mach_type_known # endif # if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \ - && !defined(__OpenBSD__) + && !defined(__OpenBSD__) && !(__NetBSD__) # define SPARC # define DRSNX # define mach_type_known @@@@ -123,6 +134,10 @@@@ # define RS6000 # define mach_type_known # endif +# if defined(__NetBSD__) && defined(__sparc__) +# define SPARC +# define mach_type_known +# endif # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386) /* The above test may need refinement */ # define I386 @@@@ -172,7 +187,7 @@@@ # endif # if defined(__alpha) || defined(__alpha__) # define ALPHA -# if !defined(LINUX) +# if !defined(LINUX) && !defined(NETBSD) # define OSF1 /* a.k.a Digital Unix */ # endif # define mach_type_known @@@@ -221,7 +236,6 @@@@ # endif # if defined(__NetBSD__) && defined(i386) # define I386 -# define NETBSD # define mach_type_known # endif # if defined(bsdi) && defined(i386) @@@@ -573,6 +587,14 @@@@ # define STACKBOTTOM ((ptr_t) 0xc0000000) # define DATAEND /* not needed */ # endif +# ifdef NETBSD +# define ALIGNMENT 4 +# define OS_TYPE "NETBSD" +# define HEURISTIC2 + extern char etext; +# define DATASTART GC_data_start +# define DYNAMIC_LOADING +# endif # endif # ifdef VAX @@@@ -602,7 +624,6 @@@@ # define MACH_TYPE "SPARC" # define ALIGNMENT 4 /* Required by hardware */ # define ALIGN_DOUBLE - extern int etext; # ifdef SUNOS5 # define OS_TYPE "SUNOS5" extern int _etext; @@@@ -674,8 +695,20 @@@@ # ifdef OPENBSD # define OS_TYPE "OPENBSD" # define STACKBOTTOM ((ptr_t) 0xf8000000) + extern int etext; # define DATASTART ((ptr_t)(&etext)) # endif +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# ifdef __ELF__ +# define DATASTART GC_data_start +# define DYNAMIC_LOADING +# else + extern char etext; +# define DATASTART ((ptr_t)(&etext)) +# endif +# endif # endif # ifdef I386 @@@@ -960,6 +993,21 @@@@ # endif # define DYNAMIC_LOADING # endif +# if defined(NETBSD) && defined(__MIPSEL__) +# define ALIGNMENT 4 +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define USE_GENERIC_PUSH_REGS 1 +# ifdef __ELF__ + extern int etext; +# define DATASTART GC_data_start +# define NEED_FIND_LIMIT +# define DYNAMIC_LOADING +# else +# define DATASTART ((ptr_t) 0x10000000) +# define STACKBOTTOM ((ptr_t) 0x7ffff000) +# endif /* _ELF_ */ +# endif # endif # ifdef RS6000 @@@@ -1019,6 +1067,16 @@@@ /* fp registers in some cases when the target is a 21264. The assembly */ /* code doesn't handle that yet, and version dependencies make that a */ /* bit tricky. Do the easy thing for now. */ +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define DATASTART GC_data_start +# define ELFCLASS32 32 +# define ELFCLASS64 64 +# define ELF_CLASS ELFCLASS64 +# define CPP_WORDSZ 64 +# define DYNAMIC_LOADING +# endif # ifdef OSF1 # define OS_TYPE "OSF1" # define DATASTART ((ptr_t) 0x140000000) @ 1.7 log @Add support for mipsel (hpcmips). Patch taken from PR#10643 by Hiroyuki Yanai . @ text @d4 1 a4 1 +++ gcconfig.h Mon Jul 24 20:42:56 2000 d120 1 a120 1 @@@@ -960,6 +993,20 @@@@ d128 1 d142 1 a142 1 @@@@ -1019,6 +1066,16 @@@@ @ 1.6 log @Update boehm-gc to 5.0alpha7. Changes from 5.0alpha3 are mostly bugfixes but there is the addition of the NetBSD/arm32 bits. This has been tested on mac68k, macppc, sparc ELF, i386 ELF. Update provided in PR#10062 by Sunagawa Keiki . @ text @d3 2 a4 2 --- gcconfig.h.orig Wed Apr 26 09:41:01 2000 +++ gcconfig.h Sat May 6 04:39:48 2000 d29 11 a39 1 @@@@ -114,7 +122,7 @@@@ d48 1 a48 1 @@@@ -123,6 +131,10 @@@@ d59 1 a59 1 @@@@ -172,7 +184,7 @@@@ d68 1 a68 1 @@@@ -221,7 +233,6 @@@@ d76 1 a76 1 @@@@ -573,6 +584,14 @@@@ d91 1 a91 1 @@@@ -602,7 +621,6 @@@@ d99 1 a99 1 @@@@ -674,8 +692,20 @@@@ d120 22 a141 1 @@@@ -1019,6 +1049,16 @@@@ @ 1.5 log @Update boehm-gc to 5.0alpha7. Changes from 5.0alpha3 are mostly bugfixes but there is the addition of the NetBSD/arm32 bits. This has been tested on mac68k, macppc, sparc ELF, i386 ELF. Update provided in PR#10062 by Sunagawa Keiki . @ text @@ 1.4 log @Make this compile (again) on sparc/a.out. Thanks to Toshihiro Kobayashi . @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 1999/11/04 15:21:58 minoura Exp $ d3 2 a4 2 --- gcconfig.h.orig Wed Sep 15 13:56:31 1999 +++ gcconfig.h Mon Dec 27 23:38:55 1999 d28 2 a29 2 # if defined(vax) @@@@ -106,7 +114,7 @@@@ d38 1 a38 1 @@@@ -115,6 +123,10 @@@@ d49 1 a49 1 @@@@ -153,7 +165,7 @@@@ d58 1 a58 1 @@@@ -202,7 +214,6 @@@@ d66 1 a66 1 @@@@ -527,6 +538,14 @@@@ d81 1 a81 1 @@@@ -556,7 +575,6 @@@@ d89 1 a89 1 @@@@ -628,8 +646,20 @@@@ d110 4 a113 4 @@@@ -919,6 +949,16 @@@@ # ifdef ALPHA # define MACH_TYPE "ALPHA" # define ALIGNMENT 8 @ 1.3 log @Make this work on sparcs. Needs tests on a.out systems. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.2 1999/09/24 16:42:06 jlam Exp $ d4 1 a4 1 +++ gcconfig.h Tue Oct 26 10:58:14 1999 d89 1 a89 1 @@@@ -628,8 +646,16 @@@@ d99 7 a105 3 +/* extern char etext; */ +# define DATASTART GC_data_start +# define DYNAMIC_LOADING d110 1 a110 1 @@@@ -919,6 +945,16 @@@@ @ 1.2 log @Update boehm-gc to 5.0alpha3. It now supports m68k, i386, sparc a.out systems and ELF ones (checked on alpha, i386, powerpc) as well. Update supplied by SUNAGAWA Keiki in PR#8482 with minor additions by me. @ text @d1 1 a1 1 $NetBSD$ d4 1 a4 1 +++ gcconfig.h Tue Sep 21 03:12:01 1999 d81 11 a91 1 @@@@ -630,6 +649,19 @@@@ d93 1 a96 1 +# define ALIGNMENT 4 d99 1 a99 1 + extern char etext; a102 5 +# ifdef NETBSD +# define OS_TYPE "NETBSD" +# define HEURISTIC2 +# define DATASTART ((ptr_t)(&etext)) +# endif d106 1 a106 1 @@@@ -919,6 +951,16 @@@@ a122 9 @@@@ -1090,7 +1132,7 @@@@ /* Use setjmp based hack to mark from callee-save registers. */ # define USE_GENERIC_PUSH_REGS # endif -# if defined(SPARC) && !defined(LINUX) +# if defined(SPARC) && !defined(LINUX) && !defined(NETBSD) # define SAVE_CALL_CHAIN # define ASM_CLEAR_CODE /* Stack clearing is crucial, and we */ /* include assembly code to do it well. */ @ 1.1 log @Make this compile on the sparc @ text @d3 124 a126 155 *** config.h.orig Wed Aug 20 20:01:31 1997 --- config.h Sun Sep 6 10:23:41 1998 *************** *** 92,98 **** # endif # if defined(sparc) && defined(unix) && !defined(sun) # define SPARC ! # define DRSNX # define mach_type_known # endif # if defined(_IBMR2) --- 92,102 ---- # endif # if defined(sparc) && defined(unix) && !defined(sun) # define SPARC ! # if defined(__NetBSD__) ! # define SUNOS4 /* XXX */ ! # else ! # define DRSNX ! # endif # define mach_type_known # endif # if defined(_IBMR2) *** dyn_load.c.orig Sun Sep 6 10:37:47 1998 --- dyn_load.c Sun Sep 6 10:58:20 1998 *************** *** 62,67 **** --- 62,99 ---- #endif #ifdef SUNOS4 # include + # ifdef __NetBSD__ + # include + # define link_dynamic _dynamic + # define link_dynamic_2 section_dispatch_table + # define ld_2 d_sdt + # define ld_1 d_sdt + # define ld_version d_version + # define ld_un d_un + + # define ldd d_debug + # define ldd_cp dd_cc + + # define rtc_symb rt_symbol + # define rtc_next rt_next + # define rtc_sp rt_sp->nlist + # define RTC_DEREF . + + # define ld_loaded sdt_loaded + # define ld_stab sdt_nzlist + # define ld_symbols sdt_strings + # define ld_symb_size sdt_str_sz + # define ld_loaded sdt_loaded + + + # define link_map so_map + # define lm_addr som_addr + # define lm_next som_next + # define lm_ld som_dynamic + # define lm_name som_path + # else + # define RTC_DEREF -> + # endif # include # include /* struct link_map field overrides */ *************** *** 150,157 **** curr_symbol = _DYNAMIC.ldd -> ldd_cp; for (; curr_symbol != 0; curr_symbol = curr_symbol -> rtc_next) { if (result == 0 ! || (ptr_t)(curr_symbol -> rtc_sp -> n_value) < result) { ! result = (ptr_t)(curr_symbol -> rtc_sp -> n_value); } } return(result); --- 184,191 ---- curr_symbol = _DYNAMIC.ldd -> ldd_cp; for (; curr_symbol != 0; curr_symbol = curr_symbol -> rtc_next) { if (result == 0 ! || (ptr_t)(curr_symbol -> rtc_sp RTC_DEREF n_value) < result) { ! result = (ptr_t)(curr_symbol -> rtc_sp RTC_DEREF n_value); } } return(result); *** mach_dep.c.orig Wed Aug 20 19:11:03 1997 --- mach_dep.c Sun Sep 6 10:19:54 1998 *************** *** 347,353 **** --- 347,357 ---- # ifdef SVR4 asm(" .globl GC_save_regs_in_stack"); asm("GC_save_regs_in_stack:"); + # ifdef __NetBSD__ + asm(" .type GC_save_regs_in_stack,@@function"); + # else asm(" .type GC_save_regs_in_stack,#function"); + # endif # else asm(" .globl _GC_save_regs_in_stack"); asm("_GC_save_regs_in_stack:"); *************** *** 380,386 **** --- 384,394 ---- # else asm(".globl GC_clear_stack_inner"); asm("GC_clear_stack_inner:"); + #ifdef __NetBSD__ + asm(".type GC_save_regs_in_stack,@@function"); + #else asm(".type GC_save_regs_in_stack,#function"); + #endif # endif asm("mov %sp,%o2"); /* Save sp */ asm("add %sp,-8,%o3"); /* p = sp-8 */ *** os_dep.c.orig Sun Sep 6 10:27:43 1998 --- os_dep.c Sun Sep 6 10:35:24 1998 *************** *** 1390,1398 **** char * addr; # ifdef SUNOS4 # define SIG_OK (sig == SIGSEGV || sig == SIGBUS) ! # define CODE_OK (FC_CODE(code) == FC_PROT \ || (FC_CODE(code) == FC_OBJERR \ && FC_ERRNO(code) == FC_PROT)) # endif # ifdef FREEBSD # define SIG_OK (sig == SIGBUS) --- 1390,1402 ---- char * addr; # ifdef SUNOS4 # define SIG_OK (sig == SIGSEGV || sig == SIGBUS) ! # if defined(__NetBSD__) ! # define CODE_OK TRUE ! # else ! # define CODE_OK (FC_CODE(code) == FC_PROT \ || (FC_CODE(code) == FC_OBJERR \ && FC_ERRNO(code) == FC_PROT)) + # endif # endif # ifdef FREEBSD # define SIG_OK (sig == SIGBUS) *************** *** 2093,2098 **** --- 2097,2106 ---- #if defined(SPARC) # if defined(SUNOS4) # include + # if defined(__NetBSD__) + # define fr_savpc fr_pc + # define fr_savfp fr_fp + # endif # else # if defined (DRSNX) # include @