summaryrefslogtreecommitdiff
path: root/devel/boehm-gc
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>1999-09-24 16:42:05 +0000
committerjlam <jlam@pkgsrc.org>1999-09-24 16:42:05 +0000
commitaa7a93bc67b9aefe0adf4b223a82932f6a5a9225 (patch)
tree4387aaa45e53105770afdc001482f99b49799ff4 /devel/boehm-gc
parentfb3cad5af74473b8df2262c2b4a74c06566636bf (diff)
downloadpkgsrc-aa7a93bc67b9aefe0adf4b223a82932f6a5a9225.tar.gz
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 <kei_sun@ba2.so-net.ne.jp> in PR#8482 with minor additions by me.
Diffstat (limited to 'devel/boehm-gc')
-rw-r--r--devel/boehm-gc/Makefile20
-rw-r--r--devel/boehm-gc/files/md54
-rw-r--r--devel/boehm-gc/files/patch-sum12
-rw-r--r--devel/boehm-gc/patches/patch-aa53
-rw-r--r--devel/boehm-gc/patches/patch-ab12
-rw-r--r--devel/boehm-gc/patches/patch-ac281
-rw-r--r--devel/boehm-gc/patches/patch-ad38
-rw-r--r--devel/boehm-gc/patches/patch-ae14
-rw-r--r--devel/boehm-gc/patches/patch-af33
-rw-r--r--devel/boehm-gc/patches/patch-ag22
-rw-r--r--devel/boehm-gc/pkg/PLIST4
11 files changed, 288 insertions, 205 deletions
diff --git a/devel/boehm-gc/Makefile b/devel/boehm-gc/Makefile
index a1bf1ddf5c1..4a5d35726f1 100644
--- a/devel/boehm-gc/Makefile
+++ b/devel/boehm-gc/Makefile
@@ -1,17 +1,14 @@
-# $NetBSD: Makefile,v 1.11 1999/05/24 20:39:37 tv Exp $
+# $NetBSD: Makefile,v 1.12 1999/09/24 16:42:05 jlam Exp $
# FreeBSD Id: Makefile,v 1.1 1996/11/16 01:51:25 jdp Exp
#
-DISTNAME= gc4.12
-PKGNAME= boehm-gc-4.12
+DISTNAME= gc5.0alpha3
+PKGNAME= boehm-gc-5.0a3
CATEGORIES= devel
-MASTER_SITES= http://reality.sgi.com/employees/boehm_mti/gc_source/
+MASTER_SITES= http://reality.sgi.com/boehm_mti/gc_source/
MAINTAINER= packages@netbsd.org
-HOMEPAGE= http://reality.sgi.com/employees/boehm_mti/gc.html
-
-NOT_FOR_PLATFORM= *-*-sparc # SEGV in "./test_cpp 1" in build: target
-NOT_FOR_PLATFORM+= *-*-alpha # needs dlopen, ELF, still SEGV's
+HOMEPAGE= http://reality.sgi.com/boehm_mti/gc.html
WRKSRC= ${WRKDIR}/gc
ALL_TARGET= BSD-pkg-all
@@ -19,4 +16,11 @@ INSTALL_TARGET= BSD-pkg-install
MAKE_ENV+= CP="${CP}" INSTALL_DATA="${INSTALL_DATA}" \
INSTALL_MAN="${INSTALL_MAN}"
+post-extract:
+ ${MV} ${WRKSRC}/gc.man ${WRKSRC}/gc.man.in
+
+pre-build:
+ ${SED} -e "s,@PREFIX@,${PREFIX},g" ${WRKSRC}/gc.man.in \
+ > ${WRKSRC}/gc.man
+
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/boehm-gc/files/md5 b/devel/boehm-gc/files/md5
index 6fe6907c5b2..7510e44e24f 100644
--- a/devel/boehm-gc/files/md5
+++ b/devel/boehm-gc/files/md5
@@ -1,3 +1,3 @@
-$NetBSD: md5,v 1.3 1998/08/07 13:21:23 agc Exp $
+$NetBSD: md5,v 1.4 1999/09/24 16:42:06 jlam Exp $
-MD5 (gc4.12.tar.gz) = 4bd802b9f586cac4a841b4730a6f3449
+MD5 (gc5.0alpha3.tar.gz) = af5221c6ce00d7dd1c4e0662e0c87008
diff --git a/devel/boehm-gc/files/patch-sum b/devel/boehm-gc/files/patch-sum
index 5da07c6aae3..4ac7b3b5a5a 100644
--- a/devel/boehm-gc/files/patch-sum
+++ b/devel/boehm-gc/files/patch-sum
@@ -1,5 +1,9 @@
-$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:32 agc Exp $
+$NetBSD: patch-sum,v 1.2 1999/09/24 16:42:06 jlam Exp $
-MD5 (patch-aa) = a87d073f91bccbb59314c4517952be50
-MD5 (patch-ab) = 9cbea562a16550e27f2a48a3303234a7
-MD5 (patch-ac) = 28b3827fd6202e0d39aa65e77de3d820
+MD5 (patch-aa) = 82291ae93bed33b331bb7d0ccf70ce48
+MD5 (patch-ab) = a0d21ebc72d75966e6ecbb1aaca196a3
+MD5 (patch-ac) = db6de3abd64d38f937139558feeac9d6
+MD5 (patch-ad) = dab09cbcc09d8140fe07588ab375e9ce
+MD5 (patch-ae) = 8de4845aca06b2bc4cfbb6c5a65e1f25
+MD5 (patch-af) = 0927f8af823f221cf985ea6b758159ee
+MD5 (patch-ag) = 38b5a5d42d578b6068071f78d057395d
diff --git a/devel/boehm-gc/patches/patch-aa b/devel/boehm-gc/patches/patch-aa
index 583cb6d3a33..284d07b1b87 100644
--- a/devel/boehm-gc/patches/patch-aa
+++ b/devel/boehm-gc/patches/patch-aa
@@ -1,23 +1,22 @@
-$NetBSD: patch-aa,v 1.3 1998/08/07 10:40:22 agc Exp $
+$NetBSD: patch-aa,v 1.4 1999/09/24 16:42:06 jlam Exp $
---- Makefile.orig Thu Aug 21 01:17:10 1997
-+++ Makefile Thu Feb 26 16:36:41 1998
-@@ -8,15 +8,35 @@
- # c++ interface to gc.a
+--- Makefile.orig Sat Sep 11 08:49:18 1999
++++ Makefile Tue Sep 21 02:41:39 1999
+@@ -9,14 +9,33 @@
# cord/de - builds dumb editor based on cords.
- CC=cc
--CXX=CC
-+CXX=c++
- AS=as
+ ABI_FLAG=
+ CC=cc $(ABI_FLAG)
+-CXX=CC $(ABI_FLAG)
+-AS=as $(ABI_FLAG)
++CXX=c++ $(ABI_FLAG)
++AS=gcc -c -x assembler-with-cpp $(ABI_FLAG)
# The above doesn't work with gas, which doesn't run cpp.
# Define AS as `gcc -c -x assembler-with-cpp' instead.
- # Under Irix 6, you will have to specify the ABI for as if you specify
- # it for the C compiler.
-
--CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DSILENT
-+CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \
-+ -DNO_EXECUTE_PERMISSION -DSILENT -DREDIRECT_MALLOC=GC_malloc
+ # Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
+ # if you use something other than the default ABI on your machine.
+ CFLAGS= -O -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -DSILENT
++
+LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
+
+BSD-pkg-all: bsd-libgc.a bsd-libleak.a
@@ -36,20 +35,19 @@ $NetBSD: patch-aa,v 1.3 1998/08/07 10:40:22 agc Exp $
+ ${INSTALL_DATA} libleak.a libgc.a ${PREFIX}/lib
+ ${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include
+ ${INSTALL_MAN} gc.man ${PREFIX}/man/man3/gc.3
-+
- # Setjmp_test may yield overly optimistic results when compiled
- # without optimization.
- # -DSILENT disables statistics printing, and improves performance.
-@@ -162,8 +182,6 @@
+
+ # For dynamic library builds, it may be necessary to add flags to generate
+ # PIC code, e.g. -fPIC on Linux.
+@@ -202,8 +221,6 @@
# not time-critical anyway.
# Set SPECIALCFLAGS to -q nodirect_code on Encore.
-all: gc.a gctest
-
- pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h config.h mach_dep.o $(SRCS)
+ pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h gcconfig.h mach_dep.o $(SRCS)
make -f PCR-Makefile depend
make -f PCR-Makefile
-@@ -210,13 +228,18 @@
+@@ -245,6 +262,12 @@
./if_mach HP_PA "" $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld
./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
@@ -60,11 +58,12 @@ $NetBSD: patch-aa,v 1.3 1998/08/07 10:40:22 agc Exp $
+ @echo "Use ./test_cpp 1 to test the leak library"
+
c++: gc_cpp.o $(srcdir)/gc_cpp.h test_cpp
- rm -f on_sparc_sunos5
- ./if_mach SPARC SUNOS5 touch on_sparc_sunos5
- ./if_mach SPARC SUNOS5 $(AR) rus gc.a gc_cpp.o
- ./if_not_there on_sparc_sunos5 $(AR) ru gc.a gc_cpp.o
- ./if_not_there on_sparc_sunos5 $(RANLIB) gc.a || cat /dev/null
+ rm -f dont_ar_4
+ ./if_mach SPARC SUNOS5 touch dont_ar_4
+@@ -253,7 +276,6 @@
+ ./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
+ ./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
+ ./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
- ./test_cpp 1
echo > c++
diff --git a/devel/boehm-gc/patches/patch-ab b/devel/boehm-gc/patches/patch-ab
index 2a8bbcfc6dd..77cf1d6e720 100644
--- a/devel/boehm-gc/patches/patch-ab
+++ b/devel/boehm-gc/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.3 1998/08/07 10:40:22 agc Exp $
+$NetBSD: patch-ab,v 1.4 1999/09/24 16:42:06 jlam Exp $
-*** gc.man.orig Fri Nov 15 08:56:14 1996
---- gc.man Fri Nov 15 09:30:14 1996
+*** gc.man.in.orig Fri Nov 15 08:56:14 1996
+--- gc.man.in Fri Nov 15 09:30:14 1996
***************
*** 9,15 ****
... malloc(...) ...
@@ -34,10 +34,10 @@ $NetBSD: patch-ab,v 1.3 1998/08/07 10:40:22 agc Exp $
+ .I gc.h
+ and
+ .I gc_cpp.h
-+ will probably be found in
-+ .I /usr/local/include,
++ will be found in
++ .I @PREFIX@/include,
+ and the libraries in
-+ .I /usr/local/lib.
++ .I @PREFIX@/lib.
+ .LP
+ These libraries have been compiled as drop-in replacements
+ for malloc and free (which is to say, all malloc
diff --git a/devel/boehm-gc/patches/patch-ac b/devel/boehm-gc/patches/patch-ac
index 9c34c1b26c4..c2f61acee48 100644
--- a/devel/boehm-gc/patches/patch-ac
+++ b/devel/boehm-gc/patches/patch-ac
@@ -1,157 +1,126 @@
-$NetBSD: patch-ac,v 1.1 1998/09/06 16:06:58 christos Exp $
+$NetBSD: patch-ac,v 1.2 1999/09/24 16:42:06 jlam Exp $
-*** 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 <dlfcn.h>
-+ # ifdef __NetBSD__
-+ # include <nlist.h>
-+ # 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 <link.h>
- # include <a.out.h>
- /* 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 <machine/frame.h>
-+ # if defined(__NetBSD__)
-+ # define fr_savpc fr_pc
-+ # define fr_savfp fr_fp
-+ # endif
- # else
- # if defined (DRSNX)
- # include <sys/sparc/frame.h>
+--- gcconfig.h.orig Wed Sep 15 13:56:31 1999
++++ gcconfig.h Tue Sep 21 03:12:01 1999
+@@ -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(vax)
+@@ -106,7 +114,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
+@@ -115,6 +123,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
+@@ -153,7 +165,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
+@@ -202,7 +214,6 @@
+ # endif
+ # if defined(__NetBSD__) && defined(i386)
+ # define I386
+-# define NETBSD
+ # define mach_type_known
+ # endif
+ # if defined(bsdi) && defined(i386)
+@@ -527,6 +538,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
+@@ -630,6 +649,19 @@
+ # define STACKBOTTOM ((ptr_t) 0xf8000000)
+ # define DATASTART ((ptr_t)(&etext))
+ # endif
++# ifdef NETBSD
++# define ALIGNMENT 4
++# define OS_TYPE "NETBSD"
++# define HEURISTIC2
++ extern char etext;
++# define DATASTART GC_data_start
++# define DYNAMIC_LOADING
++# endif
++# ifdef NETBSD
++# define OS_TYPE "NETBSD"
++# define HEURISTIC2
++# define DATASTART ((ptr_t)(&etext))
++# endif
+ # endif
+
+ # ifdef I386
+@@ -919,6 +951,16 @@
+ # ifdef ALPHA
+ # define MACH_TYPE "ALPHA"
+ # define ALIGNMENT 8
++# 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)
+@@ -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. */
diff --git a/devel/boehm-gc/patches/patch-ad b/devel/boehm-gc/patches/patch-ad
new file mode 100644
index 00000000000..136d655e84c
--- /dev/null
+++ b/devel/boehm-gc/patches/patch-ad
@@ -0,0 +1,38 @@
+$NetBSD: patch-ad,v 1.1 1999/09/24 16:42:06 jlam Exp $
+
+--- dyn_load.c.orig 1999/06/02 19:29:13 1.1.1.2
++++ dyn_load.c 1999/06/03 12:44:49 1.2
+@@ -48,7 +48,8 @@
+ #if !defined(SUNOS4) && !defined(SUNOS5DL) && !defined(IRIX5) && \
+ !defined(MSWIN32) && !(defined(ALPHA) && defined(OSF1)) && \
+ !defined(HP_PA) && !(defined(LINUX) && defined(__ELF__)) && \
+- !defined(RS6000) && !defined(SCO_ELF)
++ !defined(RS6000) && !defined(SCO_ELF) && \
++ !(defined(NETBSD) && defined(__ELF__))
+ --> We only know how to find data segments of dynamic libraries for the
+ --> above. Additional SVR4 variants might not be too
+ --> hard to add.
+@@ -260,14 +261,22 @@
+ # endif /* !USE_PROC ... */
+ # endif /* SUNOS */
+
+-#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF)
++#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
++ (defined(NETBSD) && defined(__ELF__))
+
+ /* Dynamic loading code for Linux running ELF. Somewhat tested on
+ * Linux/x86, untested but hopefully should work on Linux/Alpha.
+ * This code was derived from the Solaris/ELF support. Thanks to
+ * whatever kind soul wrote that. - Patrick Bridges */
+
++#if defined(NETBSD)
++#include <sys/exec_elf.h>
++#define DT_DEBUG 21
++#define PT_LOAD 1
++#define PF_W 0x2
++#else
+ #include <elf.h>
++#endif
+ #include <link.h>
+
+ /* Newer versions of Linux/Alpha and Linux/x86 define this macro. We
diff --git a/devel/boehm-gc/patches/patch-ae b/devel/boehm-gc/patches/patch-ae
new file mode 100644
index 00000000000..6b65f69341d
--- /dev/null
+++ b/devel/boehm-gc/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1 1999/09/24 16:42:06 jlam Exp $
+
+--- misc.c.orig 1999/06/02 19:23:56 1.1.1.1
++++ misc.c 1999/06/03 12:44:50 1.2
+@@ -433,6 +433,9 @@
+ # if defined(LINUX) && defined(SPARC)
+ GC_init_linuxsparc();
+ # endif
++# if defined(NETBSD) && defined(__ELF__)
++ GC_init_netbsd_elf();
++# endif
+ # ifdef SOLARIS_THREADS
+ GC_thr_init();
+ /* We need dirty bits in order to find live stack sections. */
diff --git a/devel/boehm-gc/patches/patch-af b/devel/boehm-gc/patches/patch-af
new file mode 100644
index 00000000000..74ee9760219
--- /dev/null
+++ b/devel/boehm-gc/patches/patch-af
@@ -0,0 +1,33 @@
+$NetBSD: patch-af,v 1.1 1999/09/24 16:42:06 jlam Exp $
+
+--- os_dep.c.orig Wed May 19 17:38:53 1999
++++ os_dep.c Tue Jun 8 01:25:18 1999
+@@ -165,6 +165,19 @@
+ }
+ #endif
+
++#if defined(NETBSD) && defined(__ELF__)
++ ptr_t GC_data_start;
++
++ void GC_init_netbsd_elf()
++ {
++ extern ptr_t GC_find_limit();
++ extern char **environ;
++ /* This may need to be environ, without the underscore, for */
++ /* some versions. */
++ GC_data_start = GC_find_limit((ptr_t)&environ, FALSE);
++ }
++#endif
++
+ # ifdef OS2
+
+ # include <stddef.h>
+@@ -2234,7 +2247,7 @@
+ * Call stack save code for debugging.
+ * Should probably be in mach_dep.c, but that requires reorganization.
+ */
+-#if defined(SPARC) && !defined(LINUX)
++#if defined(SPARC) && !defined(LINUX) && !defined(NETBSD)
+ # if defined(SUNOS4)
+ # include <machine/frame.h>
+ # else
diff --git a/devel/boehm-gc/patches/patch-ag b/devel/boehm-gc/patches/patch-ag
new file mode 100644
index 00000000000..b572853f92c
--- /dev/null
+++ b/devel/boehm-gc/patches/patch-ag
@@ -0,0 +1,22 @@
+$NetBSD: patch-ag,v 1.1 1999/09/24 16:42:06 jlam Exp $
+
+--- mach_dep.c.orig Sun Jun 27 06:26:50 1999
++++ mach_dep.c Wed Sep 22 17:39:42 1999
+@@ -197,6 +197,8 @@
+ && !defined(SCO) && !defined(SCO_ELF) \
+ && !(defined(LINUX) && defined(__ELF__)) \
+ && !(defined(__FreeBSD__) && defined(__ELF__)) \
++ && !(defined(__NetBSD__) && defined(__ELF__)) \
++ && !(defined(__OpenBSD__) && defined(__ELF__)) \
+ && !defined(DOS4GW)
+ /* I386 code, generic code does not appear to work */
+ /* It does appear to work under OS2, and asms dont */
+@@ -212,6 +214,8 @@
+
+ # if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \
+ || ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) )
++ || ( defined(I386) && defined(__NetBSD__) && defined(__ELF__) )
++ || ( defined(I386) && defined(__OpenBSD__) && defined(__ELF__) )
+
+ /* This is modified for Linux with ELF (Note: _ELF_ only) */
+ /* This section handles FreeBSD with ELF. */
diff --git a/devel/boehm-gc/pkg/PLIST b/devel/boehm-gc/pkg/PLIST
index 51a2091aaab..2a2ae9a4b7f 100644
--- a/devel/boehm-gc/pkg/PLIST
+++ b/devel/boehm-gc/pkg/PLIST
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.2 1997/11/06 09:59:06 agc Exp $
+@comment $NetBSD: PLIST,v 1.3 1999/09/24 16:42:07 jlam Exp $
include/gc.h
include/gc_cpp.h
lib/libgc.a
lib/libleak.a
-man/man3/gc.3.gz
+man/man3/gc.3