Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

latest boehm-gc pkgsrc from NetBSD-current

  • Loading branch information...
commit 490324e16752d8df58be76d4457135d1214ed176 1 parent 5f4217e
authored March 02, 2000
20  netbsd/pkgsrc/devel/boehm-gc/Makefile
... ...
@@ -1,17 +1,14 @@
1  
-# $NetBSD: Makefile,v 1.11 1999/05/24 20:39:37 tv Exp $
  1
+# $NetBSD: Makefile,v 1.12 1999/09/24 16:42:05 jlam Exp $
2 2
 # FreeBSD Id: Makefile,v 1.1 1996/11/16 01:51:25 jdp Exp
3 3
 #
4 4
 
5  
-DISTNAME=		gc4.12
6  
-PKGNAME=		boehm-gc-4.12
  5
+DISTNAME=		gc5.0alpha3
  6
+PKGNAME=		boehm-gc-5.0a3
7 7
 CATEGORIES=		devel
8  
-MASTER_SITES=		http://reality.sgi.com/employees/boehm_mti/gc_source/
  8
+MASTER_SITES=		http://reality.sgi.com/boehm_mti/gc_source/
9 9
 
10 10
 MAINTAINER=		packages@netbsd.org
11  
-HOMEPAGE=		http://reality.sgi.com/employees/boehm_mti/gc.html
12  
-
13  
-NOT_FOR_PLATFORM=	*-*-sparc	# SEGV in "./test_cpp 1" in build: target
14  
-NOT_FOR_PLATFORM+=	*-*-alpha	# needs dlopen, ELF, still SEGV's
  11
+HOMEPAGE=		http://reality.sgi.com/boehm_mti/gc.html
15 12
 
16 13
 WRKSRC=			${WRKDIR}/gc
17 14
 ALL_TARGET=		BSD-pkg-all
@@ -19,4 +16,11 @@ INSTALL_TARGET=		BSD-pkg-install
19 16
 MAKE_ENV+=		CP="${CP}" INSTALL_DATA="${INSTALL_DATA}" \
20 17
 			INSTALL_MAN="${INSTALL_MAN}"
21 18
 
  19
+post-extract:
  20
+	${MV} ${WRKSRC}/gc.man ${WRKSRC}/gc.man.in
  21
+
  22
+pre-build:
  23
+	${SED} -e "s,@PREFIX@,${PREFIX},g" ${WRKSRC}/gc.man.in \
  24
+		> ${WRKSRC}/gc.man
  25
+
22 26
 .include "../../mk/bsd.pkg.mk"
4  netbsd/pkgsrc/devel/boehm-gc/files/md5
... ...
@@ -1,3 +1,3 @@
1  
-$NetBSD: md5,v 1.3 1998/08/07 13:21:23 agc Exp $
  1
+$NetBSD: md5,v 1.4 1999/09/24 16:42:06 jlam Exp $
2 2
 
3  
-MD5 (gc4.12.tar.gz) = 4bd802b9f586cac4a841b4730a6f3449
  3
+MD5 (gc5.0alpha3.tar.gz) = af5221c6ce00d7dd1c4e0662e0c87008
13  netbsd/pkgsrc/devel/boehm-gc/files/patch-sum
... ...
@@ -1,5 +1,10 @@
1  
-$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:32 agc Exp $
  1
+$NetBSD: patch-sum,v 1.5 1999/12/28 14:12:30 minoura Exp $
2 2
 
3  
-MD5 (patch-aa) = a87d073f91bccbb59314c4517952be50
4  
-MD5 (patch-ab) = 9cbea562a16550e27f2a48a3303234a7
5  
-MD5 (patch-ac) = 28b3827fd6202e0d39aa65e77de3d820
  3
+MD5 (patch-aa) = 45c6600f71503b6da766239e96e55ac7
  4
+MD5 (patch-ab) = a0d21ebc72d75966e6ecbb1aaca196a3
  5
+MD5 (patch-ac) = eda45a71c3bbbd89861e54fcc7248ecd
  6
+MD5 (patch-ad) = dab09cbcc09d8140fe07588ab375e9ce
  7
+MD5 (patch-ae) = 1aa3ea19d2a773f3e4a2fbdf4d83b17c
  8
+MD5 (patch-af) = fac88bab69e4dfa6dfd93f096346a7a5
  9
+MD5 (patch-ag) = 38b5a5d42d578b6068071f78d057395d
  10
+MD5 (patch-ah) = 98e91c395cc2eba749868181f0b018e0
70  netbsd/pkgsrc/devel/boehm-gc/patches/patch-aa
... ...
@@ -1,22 +1,20 @@
1  
-$NetBSD: patch-aa,v 1.3 1998/08/07 10:40:22 agc Exp $
2  
-
3  
---- Makefile.orig	Thu Aug 21 01:17:10 1997
4  
-+++ Makefile	Thu Feb 26 16:36:41 1998
5  
-@@ -8,15 +8,35 @@
6  
- #	 c++ interface to gc.a
  1
+$NetBSD: patch-aa,v 1.6 1999/12/28 04:57:49 wiz Exp $
  2
+--- Makefile.orig	Sat Sep 11 08:49:18 1999
  3
++++ Makefile	Tue Oct 26 10:48:45 1999
  4
+@@ -9,8 +9,8 @@
7 5
  # cord/de - builds dumb editor based on cords.
8  
- CC=cc
9  
--CXX=CC
10  
-+CXX=c++
11  
- AS=as
  6
+ ABI_FLAG=
  7
+ CC=cc $(ABI_FLAG)
  8
+-CXX=CC $(ABI_FLAG)
  9
+-AS=as $(ABI_FLAG)
  10
++CXX=c++ $(ABI_FLAG)
  11
++AS=gcc -c -x assembler-with-cpp $(ABI_FLAG)
12 12
  #  The above doesn't work with gas, which doesn't run cpp.
13 13
  #  Define AS as `gcc -c -x assembler-with-cpp' instead.
14  
- #  Under Irix 6, you will have to specify the ABI for as if you specify
15  
- #  it for the C compiler.
  14
+ #  Under Irix 6, you will have to specify the ABI (-o32, -n32, or -64)
  15
+@@ -18,6 +18,25 @@
16 16
  
17  
--CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE -DNO_EXECUTE_PERMISSION -DSILENT
18  
-+CFLAGS= -O -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \
19  
-+	-DNO_EXECUTE_PERMISSION -DSILENT -DREDIRECT_MALLOC=GC_malloc
  17
+ CFLAGS= -O -DATOMIC_UNCOLLECTABLE -DNO_SIGNALS -DNO_EXECUTE_PERMISSION -DALL_INTERIOR_POINTERS -DSILENT
20 18
  
21 19
 +LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
22 20
 +
@@ -36,20 +34,29 @@ $NetBSD: patch-aa,v 1.3 1998/08/07 10:40:22 agc Exp $
36 34
 +	${INSTALL_DATA} libleak.a libgc.a ${PREFIX}/lib
37 35
 +	${INSTALL_DATA} gc.h gc_cpp.h ${PREFIX}/include
38 36
 +	${INSTALL_MAN} gc.man ${PREFIX}/man/man3/gc.3
39  
-+  
40  
- # Setjmp_test may yield overly optimistic results when compiled
41  
- # without optimization.
42  
- # -DSILENT disables statistics printing, and improves performance.
43  
-@@ -162,8 +182,6 @@
  37
++
  38
+ # For dynamic library builds, it may be necessary to add flags to generate
  39
+ # PIC code, e.g. -fPIC on Linux.
  40
+ 
  41
+@@ -163,7 +182,7 @@
  42
+     threadlibs.c if_mach.c if_not_there.c gc_cpp.cc gc_cpp.h weakpointer.h \
  43
+     gcc_support.c mips_ultrix_mach_dep.s include/gc_alloc.h gc_alloc.h \
  44
+     include/new_gc_alloc.h include/javaxfc.h sparc_sunos4_mach_dep.s \
  45
+-    solaris_threads.h backptr.h $(CORD_SRCS)
  46
++    sparc_netbsd_mach_dep.s solaris_threads.h backptr.h $(CORD_SRCS)
  47
+ 
  48
+ OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
  49
+            README test.c test_cpp.cc setjmp_t.c SMakefile.amiga \
  50
+@@ -202,8 +221,6 @@
44 51
  # not time-critical anyway.
45 52
  # Set SPECIALCFLAGS to -q nodirect_code on Encore.
46 53
  
47 54
 -all: gc.a gctest
48 55
 -
49  
- pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h config.h mach_dep.o $(SRCS)
  56
+ pcr: PCR-Makefile gc_private.h gc_hdrs.h gc.h gcconfig.h mach_dep.o $(SRCS)
50 57
  	make -f PCR-Makefile depend
51 58
  	make -f PCR-Makefile
52  
-@@ -210,13 +228,18 @@
  59
+@@ -245,6 +262,12 @@
53 60
  	./if_mach HP_PA "" $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld
54 61
  	./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
55 62
  
@@ -60,12 +67,21 @@ $NetBSD: patch-aa,v 1.3 1998/08/07 10:40:22 agc Exp $
60 67
 +	@echo "Use ./test_cpp 1 to test the leak library"
61 68
 +
62 69
  c++: gc_cpp.o $(srcdir)/gc_cpp.h test_cpp
63  
- 	rm -f on_sparc_sunos5
64  
- 	./if_mach SPARC SUNOS5 touch on_sparc_sunos5
65  
- 	./if_mach SPARC SUNOS5 $(AR) rus gc.a gc_cpp.o
66  
- 	./if_not_there on_sparc_sunos5 $(AR) ru gc.a gc_cpp.o
67  
- 	./if_not_there on_sparc_sunos5 $(RANLIB) gc.a || cat /dev/null
  70
+ 	rm -f dont_ar_4
  71
+ 	./if_mach SPARC SUNOS5 touch dont_ar_4
  72
+@@ -253,7 +276,6 @@
  73
+ 	./if_mach M68K AMIGA $(AR) -vrus gc.a gc_cpp.o
  74
+ 	./if_not_there dont_ar_4 $(AR) ru gc.a gc_cpp.o
  75
+ 	./if_not_there dont_ar_4 $(RANLIB) gc.a || cat /dev/null
68 76
 -	./test_cpp 1
69 77
  	echo > c++
70 78
  
71 79
  dyn_load_sunos53.o: dyn_load.c
  80
+@@ -302,6 +324,7 @@
  81
+ 	./if_mach SPARC SUNOS5 $(AS) -o mach_dep.o $(srcdir)/sparc_mach_dep.s
  82
+ 	./if_mach SPARC SUNOS4 $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
  83
+ 	./if_mach SPARC OPENBSD $(AS) -o mach_dep.o $(srcdir)/sparc_sunos4_mach_dep.s
  84
++	./if_mach SPARC NETBSD $(AS) -o mach_dep.o $(srcdir)/sparc_netbsd_mach_dep.s
  85
+ 	./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c
  86
+ 
  87
+ mark_rts.o: $(srcdir)/mark_rts.c if_mach if_not_there $(UTILS)
12  netbsd/pkgsrc/devel/boehm-gc/patches/patch-ab
... ...
@@ -1,7 +1,7 @@
1  
-$NetBSD: patch-ab,v 1.3 1998/08/07 10:40:22 agc Exp $
  1
+$NetBSD: patch-ab,v 1.4 1999/09/24 16:42:06 jlam Exp $
2 2
 
3  
-*** gc.man.orig	Fri Nov 15 08:56:14 1996
4  
---- gc.man	Fri Nov 15 09:30:14 1996
  3
+*** gc.man.in.orig	Fri Nov 15 08:56:14 1996
  4
+--- gc.man.in	Fri Nov 15 09:30:14 1996
5 5
 ***************
6 6
 *** 9,15 ****
7 7
   ... malloc(...) ...
@@ -34,10 +34,10 @@ $NetBSD: patch-ab,v 1.3 1998/08/07 10:40:22 agc Exp $
34 34
 + .I gc.h
35 35
 + and
36 36
 + .I gc_cpp.h
37  
-+ will probably be found in
38  
-+ .I /usr/local/include,
  37
++ will be found in
  38
++ .I @PREFIX@/include,
39 39
 + and the libraries in
40  
-+ .I /usr/local/lib.
  40
++ .I @PREFIX@/lib.
41 41
 + .LP
42 42
 + These libraries have been compiled as drop-in replacements
43 43
 + for malloc and free (which is to say, all malloc
281  netbsd/pkgsrc/devel/boehm-gc/patches/patch-ac
... ...
@@ -1,157 +1,126 @@
1  
-$NetBSD: patch-ac,v 1.1 1998/09/06 16:06:58 christos Exp $
  1
+$NetBSD: patch-ac,v 1.4 1999/12/28 14:07:43 minoura Exp $
2 2
 
3  
-*** config.h.orig	Wed Aug 20 20:01:31 1997
4  
---- config.h	Sun Sep  6 10:23:41 1998
5  
-***************
6  
-*** 92,98 ****
7  
-  # endif
8  
-  # if defined(sparc) && defined(unix) && !defined(sun)
9  
-  #   define SPARC
10  
-! #   define DRSNX
11  
-  #   define mach_type_known
12  
-  # endif
13  
-  # if defined(_IBMR2)
14  
---- 92,102 ----
15  
-  # endif
16  
-  # if defined(sparc) && defined(unix) && !defined(sun)
17  
-  #   define SPARC
18  
-! #   if defined(__NetBSD__)
19  
-! #     define SUNOS4	/* XXX */
20  
-! #   else
21  
-! #     define DRSNX
22  
-! #   endif
23  
-  #   define mach_type_known
24  
-  # endif
25  
-  # if defined(_IBMR2)
26  
-*** dyn_load.c.orig	Sun Sep  6 10:37:47 1998
27  
---- dyn_load.c	Sun Sep  6 10:58:20 1998
28  
-***************
29  
-*** 62,67 ****
30  
---- 62,99 ----
31  
-  #endif
32  
-  #ifdef SUNOS4
33  
-  #   include <dlfcn.h>
34  
-+ #   ifdef __NetBSD__
35  
-+ #	include <nlist.h>
36  
-+ #	define link_dynamic _dynamic
37  
-+ #	define link_dynamic_2 section_dispatch_table
38  
-+ #	define ld_2 d_sdt
39  
-+ #	define ld_1 d_sdt
40  
-+ #	define ld_version d_version
41  
-+ #	define ld_un d_un 
42  
-+ 
43  
-+ #	define ldd d_debug
44  
-+ #	define ldd_cp dd_cc
45  
-+ 
46  
-+ #	define rtc_symb rt_symbol
47  
-+ #	define rtc_next rt_next
48  
-+ #	define rtc_sp	rt_sp->nlist
49  
-+ #	define RTC_DEREF .
50  
-+ 
51  
-+ #	define ld_loaded sdt_loaded
52  
-+ #	define ld_stab sdt_nzlist  
53  
-+ #	define ld_symbols sdt_strings
54  
-+ #	define ld_symb_size sdt_str_sz
55  
-+ #	define ld_loaded sdt_loaded
56  
-+ 
57  
-+ 
58  
-+ #	define link_map so_map
59  
-+ #	define lm_addr som_addr 
60  
-+ #	define lm_next som_next
61  
-+ #	define lm_ld som_dynamic
62  
-+ #	define lm_name som_path
63  
-+ #   else
64  
-+ #	define RTC_DEREF ->
65  
-+ #   endif
66  
-  #   include <link.h>
67  
-  #   include <a.out.h>
68  
-    /* struct link_map field overrides */
69  
-***************
70  
-*** 150,157 ****
71  
-      curr_symbol = _DYNAMIC.ldd -> ldd_cp;
72  
-      for (; curr_symbol != 0; curr_symbol = curr_symbol -> rtc_next) {
73  
-          if (result == 0
74  
-!             || (ptr_t)(curr_symbol -> rtc_sp -> n_value) < result) {
75  
-!             result = (ptr_t)(curr_symbol -> rtc_sp -> n_value);
76  
-          }
77  
-      }
78  
-      return(result);
79  
---- 184,191 ----
80  
-      curr_symbol = _DYNAMIC.ldd -> ldd_cp;
81  
-      for (; curr_symbol != 0; curr_symbol = curr_symbol -> rtc_next) {
82  
-          if (result == 0
83  
-!             || (ptr_t)(curr_symbol -> rtc_sp RTC_DEREF n_value) < result) {
84  
-!             result = (ptr_t)(curr_symbol -> rtc_sp RTC_DEREF n_value);
85  
-          }
86  
-      }
87  
-      return(result);
88  
-*** mach_dep.c.orig	Wed Aug 20 19:11:03 1997
89  
---- mach_dep.c	Sun Sep  6 10:19:54 1998
90  
-***************
91  
-*** 347,353 ****
92  
---- 347,357 ----
93  
-  #   ifdef SVR4
94  
-        asm("	.globl	GC_save_regs_in_stack");
95  
-        asm("GC_save_regs_in_stack:");
96  
-+ #    ifdef __NetBSD__
97  
-+       asm("	.type GC_save_regs_in_stack,@function");
98  
-+ #    else
99  
-        asm("	.type GC_save_regs_in_stack,#function");
100  
-+ #    endif
101  
-  #   else
102  
-        asm("	.globl	_GC_save_regs_in_stack");
103  
-        asm("_GC_save_regs_in_stack:");
104  
-***************
105  
-*** 380,386 ****
106  
---- 384,394 ----
107  
-  # else
108  
-      asm(".globl GC_clear_stack_inner");
109  
-      asm("GC_clear_stack_inner:");
110  
-+ #ifdef __NetBSD__
111  
-+     asm(".type GC_save_regs_in_stack,@function");
112  
-+ #else
113  
-      asm(".type GC_save_regs_in_stack,#function");
114  
-+ #endif
115  
-  # endif
116  
-    asm("mov %sp,%o2");		/* Save sp	*/
117  
-    asm("add %sp,-8,%o3");	/* p = sp-8	*/
118  
-*** os_dep.c.orig	Sun Sep  6 10:27:43 1998
119  
---- os_dep.c	Sun Sep  6 10:35:24 1998
120  
-***************
121  
-*** 1390,1398 ****
122  
-      char * addr;
123  
-  #   ifdef SUNOS4
124  
-  #     define SIG_OK (sig == SIGSEGV || sig == SIGBUS)
125  
-! #     define CODE_OK (FC_CODE(code) == FC_PROT \
126  
-                	    || (FC_CODE(code) == FC_OBJERR \
127  
-                	       && FC_ERRNO(code) == FC_PROT))
128  
-  #   endif
129  
-  #   ifdef FREEBSD
130  
-  #     define SIG_OK (sig == SIGBUS)
131  
---- 1390,1402 ----
132  
-      char * addr;
133  
-  #   ifdef SUNOS4
134  
-  #     define SIG_OK (sig == SIGSEGV || sig == SIGBUS)
135  
-! #     if defined(__NetBSD__)
136  
-! #	define CODE_OK TRUE
137  
-! #     else
138  
-! #       define CODE_OK (FC_CODE(code) == FC_PROT \
139  
-                	    || (FC_CODE(code) == FC_OBJERR \
140  
-                	       && FC_ERRNO(code) == FC_PROT))
141  
-+ #     endif
142  
-  #   endif
143  
-  #   ifdef FREEBSD
144  
-  #     define SIG_OK (sig == SIGBUS)
145  
-***************
146  
-*** 2093,2098 ****
147  
---- 2097,2106 ----
148  
-  #if defined(SPARC)
149  
-  #   if defined(SUNOS4)
150  
-  #     include <machine/frame.h>
151  
-+ #     if defined(__NetBSD__)
152  
-+ #	define fr_savpc fr_pc
153  
-+ #	define fr_savfp fr_fp
154  
-+ #     endif
155  
-  #   else
156  
-  #     if defined (DRSNX)
157  
-  #	include <sys/sparc/frame.h>
  3
+--- gcconfig.h.orig	Wed Sep 15 13:56:31 1999
  4
++++ gcconfig.h	Mon Dec 27 23:38:55 1999
  5
+@@ -27,6 +27,11 @@
  6
+ #    define LINUX
  7
+ # endif
  8
+ 
  9
++# if defined(__NetBSD__)
  10
++#    define NETBSD
  11
++#    define unix /* symbol unix is no longer defined in NetBSD */
  12
++# endif
  13
++
  14
+ /* Determine the machine type: */
  15
+ # if defined(sun) && defined(mc68000)
  16
+ #    define M68K
  17
+@@ -50,7 +55,10 @@
  18
+ # endif
  19
+ # if defined(__NetBSD__) && defined(m68k)
  20
+ #    define M68K
  21
+-#    define NETBSD
  22
++#    define mach_type_known
  23
++# endif
  24
++# if defined(__NetBSD__) && defined(__powerpc__)
  25
++#    define POWERPC
  26
+ #    define mach_type_known
  27
+ # endif
  28
+ # if defined(vax)
  29
+@@ -106,7 +114,7 @@
  30
+ #   define mach_type_known
  31
+ # endif
  32
+ # if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
  33
+-     && !defined(__OpenBSD__)
  34
++     && !defined(__OpenBSD__) && !(__NetBSD__)
  35
+ #   define SPARC
  36
+ #   define DRSNX
  37
+ #   define mach_type_known
  38
+@@ -115,6 +123,10 @@
  39
+ #   define RS6000
  40
+ #   define mach_type_known
  41
+ # endif
  42
++# if defined(__NetBSD__) && defined(__sparc__)
  43
++#   define SPARC
  44
++#   define mach_type_known
  45
++# endif
  46
+ # if defined(_M_XENIX) && defined(_M_SYSV) && defined(_M_I386)
  47
+ 	/* The above test may need refinement	*/
  48
+ #   define I386
  49
+@@ -153,7 +165,7 @@
  50
+ # endif
  51
+ # if defined(__alpha) || defined(__alpha__)
  52
+ #   define ALPHA
  53
+-#   if !defined(LINUX)
  54
++#   if !defined(LINUX) && !defined(NETBSD)
  55
+ #     define OSF1	/* a.k.a Digital Unix */
  56
+ #   endif
  57
+ #   define mach_type_known
  58
+@@ -202,7 +214,6 @@
  59
+ # endif
  60
+ # if defined(__NetBSD__) && defined(i386)
  61
+ #   define I386
  62
+-#   define NETBSD
  63
+ #   define mach_type_known
  64
+ # endif
  65
+ # if defined(bsdi) && defined(i386)
  66
+@@ -527,6 +538,14 @@
  67
+ #     define STACKBOTTOM ((ptr_t) 0xc0000000)
  68
+ #     define DATAEND	/* not needed */
  69
+ #   endif
  70
++#   ifdef NETBSD
  71
++#     define ALIGNMENT 4
  72
++#     define OS_TYPE "NETBSD"
  73
++#     define HEURISTIC2
  74
++      extern char etext;
  75
++#     define DATASTART GC_data_start
  76
++#     define DYNAMIC_LOADING
  77
++#   endif
  78
+ # endif
  79
+ 
  80
+ # ifdef VAX
  81
+@@ -556,7 +575,6 @@
  82
+ #   define MACH_TYPE "SPARC"
  83
+ #   define ALIGNMENT 4	/* Required by hardware	*/
  84
+ #   define ALIGN_DOUBLE
  85
+-    extern int etext;
  86
+ #   ifdef SUNOS5
  87
+ #	define OS_TYPE "SUNOS5"
  88
+ 	extern int _etext;
  89
+@@ -628,8 +646,20 @@
  90
+ #   ifdef OPENBSD
  91
+ #     define OS_TYPE "OPENBSD"
  92
+ #     define STACKBOTTOM ((ptr_t) 0xf8000000)
  93
++      extern int etext;
  94
+ #     define DATASTART ((ptr_t)(&etext))
  95
+ #   endif
  96
++#   ifdef NETBSD
  97
++#     define OS_TYPE "NETBSD"
  98
++#     define HEURISTIC2
  99
++#     ifdef __ELF__
  100
++#	define DATASTART GC_data_start
  101
++#	define DYNAMIC_LOADING
  102
++#     else
  103
++	extern char etext;
  104
++#	define DATASTART ((ptr_t)(&etext))
  105
++#     endif
  106
++#   endif
  107
+ # endif
  108
+ 
  109
+ # ifdef I386
  110
+@@ -919,6 +949,16 @@
  111
+ # ifdef ALPHA
  112
+ #   define MACH_TYPE "ALPHA"
  113
+ #   define ALIGNMENT 8
  114
++#   ifdef NETBSD
  115
++#	define OS_TYPE "NETBSD"
  116
++#	define HEURISTIC2
  117
++#	define DATASTART GC_data_start
  118
++#	define ELFCLASS32 32
  119
++#	define ELFCLASS64 64
  120
++#	define ELF_CLASS ELFCLASS64
  121
++#   	define CPP_WORDSZ 64
  122
++#       define DYNAMIC_LOADING
  123
++#   endif
  124
+ #   ifdef OSF1
  125
+ #	define OS_TYPE "OSF1"
  126
+ #   	define DATASTART ((ptr_t) 0x140000000)
38  netbsd/pkgsrc/devel/boehm-gc/patches/patch-ad
... ...
@@ -0,0 +1,38 @@
  1
+$NetBSD: patch-ad,v 1.1 1999/09/24 16:42:06 jlam Exp $
  2
+
  3
+--- dyn_load.c.orig	1999/06/02 19:29:13	1.1.1.2
  4
++++ dyn_load.c	1999/06/03 12:44:49	1.2
  5
+@@ -48,7 +48,8 @@
  6
+ #if !defined(SUNOS4) && !defined(SUNOS5DL) && !defined(IRIX5) && \
  7
+     !defined(MSWIN32) && !(defined(ALPHA) && defined(OSF1)) && \
  8
+     !defined(HP_PA) && !(defined(LINUX) && defined(__ELF__)) && \
  9
+-    !defined(RS6000) && !defined(SCO_ELF)
  10
++    !defined(RS6000) && !defined(SCO_ELF) && \
  11
++    !(defined(NETBSD) && defined(__ELF__))
  12
+  --> We only know how to find data segments of dynamic libraries for the
  13
+  --> above.  Additional SVR4 variants might not be too
  14
+  --> hard to add.
  15
+@@ -260,14 +261,22 @@
  16
+ # endif /* !USE_PROC ... */
  17
+ # endif /* SUNOS */
  18
+ 
  19
+-#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF)
  20
++#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
  21
++    (defined(NETBSD) && defined(__ELF__))
  22
+ 
  23
+ /* Dynamic loading code for Linux running ELF. Somewhat tested on
  24
+  * Linux/x86, untested but hopefully should work on Linux/Alpha. 
  25
+  * This code was derived from the Solaris/ELF support. Thanks to
  26
+  * whatever kind soul wrote that.  - Patrick Bridges */
  27
+ 
  28
++#if defined(NETBSD)
  29
++#include <sys/exec_elf.h>
  30
++#define DT_DEBUG	21
  31
++#define PT_LOAD		1
  32
++#define PF_W		0x2
  33
++#else
  34
+ #include <elf.h>
  35
++#endif
  36
+ #include <link.h>
  37
+ 
  38
+ /* Newer versions of Linux/Alpha and Linux/x86 define this macro.  We
14  netbsd/pkgsrc/devel/boehm-gc/patches/patch-ae
... ...
@@ -0,0 +1,14 @@
  1
+$NetBSD: patch-ae,v 1.2 1999/11/15 17:59:48 rh Exp $
  2
+
  3
+--- misc.c.orig	Mon Nov 15 18:56:45 1999
  4
++++ misc.c	Mon Nov 15 18:56:45 1999
  5
+@@ -436,6 +436,9 @@
  6
+ #   if defined(LINUX) && (defined(POWERPC) || defined(ALPHA) || defined(SPARC))
  7
+ 	GC_init_linux_data_start();
  8
+ #   endif
  9
++#   if defined(NETBSD) && defined(__ELF__)
  10
++	GC_init_netbsd_elf();
  11
++#   endif
  12
+ #   ifdef SOLARIS_THREADS
  13
+ 	GC_thr_init();
  14
+ 	/* We need dirty bits in order to find live stack sections.	*/
42  netbsd/pkgsrc/devel/boehm-gc/patches/patch-af
... ...
@@ -0,0 +1,42 @@
  1
+$NetBSD: patch-af,v 1.2 1999/11/04 15:21:58 minoura Exp $
  2
+
  3
+--- os_dep.c.orig	Fri Jul  9 05:01:06 1999
  4
++++ os_dep.c	Tue Oct 26 11:14:37 1999
  5
+@@ -156,6 +156,19 @@
  6
+   }
  7
+ #endif
  8
+ 
  9
++#if defined(NETBSD) && defined(__ELF__)
  10
++  ptr_t GC_data_start;
  11
++
  12
++  void GC_init_netbsd_elf()
  13
++  {
  14
++    extern ptr_t GC_find_limit();
  15
++    extern char **environ;
  16
++	/* This may need to be environ, without the underscore, for	*/
  17
++	/* some versions.						*/
  18
++    GC_data_start = GC_find_limit((ptr_t)&environ, FALSE);
  19
++  }
  20
++#endif
  21
++
  22
+ # ifdef OS2
  23
+ 
  24
+ # include <stddef.h>
  25
+@@ -2407,7 +2420,7 @@
  26
+ #     if defined (DRSNX)
  27
+ #	include <sys/sparc/frame.h>
  28
+ #     else
  29
+-#        if defined(OPENBSD)
  30
++#        if defined(OPENBSD) || defined(NETBSD)
  31
+ #          include <frame.h>
  32
+ #        else
  33
+ #          include <sys/frame.h>
  34
+@@ -2422,7 +2435,7 @@
  35
+ /* Fill in the pc and argument information for up to NFRAMES of my	*/
  36
+ /* callers.  Ignore my frame and my callers frame.			*/
  37
+ 
  38
+-#ifdef OPENBSD
  39
++#if defined(OPENBSD) || defined(NETBSD)
  40
+ #  define FR_SAVFP fr_fp
  41
+ #  define FR_SAVPC fr_pc
  42
+ #else
22  netbsd/pkgsrc/devel/boehm-gc/patches/patch-ag
... ...
@@ -0,0 +1,22 @@
  1
+$NetBSD: patch-ag,v 1.1 1999/09/24 16:42:06 jlam Exp $
  2
+
  3
+--- mach_dep.c.orig	Sun Jun 27 06:26:50 1999
  4
++++ mach_dep.c	Wed Sep 22 17:39:42 1999
  5
+@@ -197,6 +197,8 @@
  6
+ 	&& !defined(SCO) && !defined(SCO_ELF) \
  7
+  	&& !(defined(LINUX)       && defined(__ELF__)) \
  8
+ 	&& !(defined(__FreeBSD__) && defined(__ELF__)) \
  9
++	&& !(defined(__NetBSD__) && defined(__ELF__)) \
  10
++	&& !(defined(__OpenBSD__) && defined(__ELF__)) \
  11
+ 	&& !defined(DOS4GW)
  12
+ 	/* I386 code, generic code does not appear to work */
  13
+ 	/* It does appear to work under OS2, and asms dont */
  14
+@@ -212,6 +214,8 @@
  15
+ 
  16
+ #	if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \
  17
+ 	|| ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) )
  18
++	|| ( defined(I386) && defined(__NetBSD__) && defined(__ELF__) )
  19
++	|| ( defined(I386) && defined(__OpenBSD__) && defined(__ELF__) )
  20
+ 
  21
+ 	/* This is modified for Linux with ELF (Note: _ELF_ only) */
  22
+ 	/* This section handles FreeBSD with ELF. */
38  netbsd/pkgsrc/devel/boehm-gc/patches/patch-ah
... ...
@@ -0,0 +1,38 @@
  1
+$NetBSD: patch-ah,v 1.2 1999/12/28 04:57:50 wiz Exp $
  2
+--- /dev/null	Tue Oct 26 10:29:31 1999
  3
++++ sparc_netbsd_mach_dep.s	Tue Oct 26 10:52:55 1999
  4
+@@ -0,0 +1,34 @@
  5
++!	SPARCompiler 3.0 and later apparently no longer handles
  6
++!	asm outside functions.  So we need a separate .s file
  7
++!	This is only set up for SunOS 4.
  8
++!	Assumes this is called before the stack contents are
  9
++!	examined.
  10
++
  11
++#include "machine/asm.h"
  12
++
  13
++	.seg 	"text"
  14
++	.globl	_C_LABEL(GC_save_regs_in_stack)
  15
++	.globl 	_C_LABEL(GC_push_regs)
  16
++_C_LABEL(GC_save_regs_in_stack):
  17
++_C_LABEL(GC_push_regs):
  18
++	ta	0x3   ! ST_FLUSH_WINDOWS
  19
++	mov	%sp,%o0
  20
++	retl
  21
++	nop
  22
++	
  23
++	.globl	_C_LABEL(GC_clear_stack_inner)
  24
++_C_LABEL(GC_clear_stack_inner):
  25
++	mov	%sp,%o2		! Save sp
  26
++	add	%sp,-8,%o3	! p = sp-8
  27
++	clr	%g1		! [g0,g1] = 0
  28
++	add	%o1,-0x60,%sp	! Move sp out of the way,
  29
++				! so that traps still work.
  30
++				! Includes some extra words
  31
++				! so we can be sloppy below.
  32
++loop:
  33
++	std	%g0,[%o3]	! *(long long *)p = 0
  34
++	cmp	%o3,%o1
  35
++	bgu	loop		! if (p > limit) goto loop
  36
++	add	%o3,-8,%o3	! p -= 8 (delay slot)
  37
++	retl
  38
++	mov	%o2,%sp		! Restore sp., delay slot
2  netbsd/pkgsrc/devel/boehm-gc/pkg/COMMENT
... ...
@@ -1 +1 @@
1  
-Garbage collection and memory leak detection for C and C++.
  1
+Garbage collection and memory leak detection for C and C++
4  netbsd/pkgsrc/devel/boehm-gc/pkg/PLIST
... ...
@@ -1,6 +1,6 @@
1  
-@comment $NetBSD: PLIST,v 1.2 1997/11/06 09:59:06 agc Exp $
  1
+@comment $NetBSD: PLIST,v 1.3 1999/09/24 16:42:07 jlam Exp $
2 2
 include/gc.h
3 3
 include/gc_cpp.h
4 4
 lib/libgc.a
5 5
 lib/libleak.a
6  
-man/man3/gc.3.gz
  6
+man/man3/gc.3

0 notes on commit 490324e

Please sign in to comment.
Something went wrong with that request. Please try again.