Update devel/boehm-gc port to 6.0.

Since I do not know whether non-i386 platforms are supported,
ONLY_FOR_ARCHS=i386 is remained in Makefile.

Changes from previous version:
* Install shared library.
* Do not create and install libleak.
  Leak detection mode can be initiated at run-time by setting GC_find_leak.

PR:		31125
Submitted by:	MANTANI Nobutaka <nobutaka@nobutaka.com>
This commit is contained in:
Ying-Chieh Liao 2001-10-11 12:08:59 +00:00
parent d29487312e
commit 36efdc4c61
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=48682
8 changed files with 80 additions and 173 deletions

View file

@ -6,23 +6,24 @@
#
PORTNAME= boehm-gc
PORTVERSION= 5.3
PORTREVISION= 1
PORTVERSION= 6.0
CATEGORIES= devel
MASTER_SITES= http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/
DISTNAME= gc5.3
DISTNAME= gc${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
ONLY_FOR_ARCHS= i386 # XXX can't figure out whether to define
# # XXX SEARCH_FOR_DATA_START on other platforms
WRKSRC= ${WRKDIR}/gc
HAS_CONFIGURE= yes
INSTALLS_SHLIB= yes
MAN3= gc.3
ALL_TARGET= FreeBSD-pkg-all
INSTALL_TARGET= FreeBSD-pkg-install
MAKE_ENV+= CP="${CP}"
MAKE_ENV+= INSTALL_DATA="${INSTALL_DATA}"
MAKE_ENV+= INSTALL_MAN="${INSTALL_MAN}"
post-install:
${INSTALL_DATA} ${WRKSRC}/include/gc.h ${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/include/gc_cpp.h ${PREFIX}/include
${INSTALL_MAN} ${WRKSRC}/doc/gc.man ${PREFIX}/man/man3/gc.3
.include <bsd.port.mk>

View file

@ -1 +1 @@
MD5 (gc5.3.tar.gz) = f5f65b9e2c4b7762fa567d5b91b573bb
MD5 (gc6.0.tar.gz) = 528371164ac9838dcb263fede456eff6

View file

@ -1,89 +0,0 @@
--- Makefile.orig Sat Sep 23 02:27:35 2000
+++ Makefile Wed Jan 10 16:16:18 2001
@@ -8,16 +8,43 @@
# c++ interface to gc.a
# cord/de - builds dumb editor based on cords.
ABI_FLAG=
-CC=cc $(ABI_FLAG)
HOSTCC=$(CC)
-CXX=g++ $(ABI_FLAG)
-AS=as $(ABI_FLAG)
+CC+= $(ABI_FLAG)
+CXX+= $(ABI_FLAG)
+AS=cc -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 (-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
+# We want this to be a drop-in linkable library, hence the -DREDIRECT.
+# The new c++-t and c++-nt (test and notest) are because we don't want
+# to fill anyone's log with leak messages! - MMCG
+
+GCFLAGS= -DNO_SIGNALS -DALL_INTERIOR_POINTERS -DATOMIC_UNCOLLECTABLE \
+ -DNO_EXECUTE_PERMISSION -DSILENT
+CFLAGS+= $(GCFLAGS)
+
+LEAKFLAGS=$(CFLAGS) -DFIND_LEAK
+
+all: gc.a gctest
+
+FreeBSD-pkg-all: fbsd-libgc.a fbsd-libleak.a
+
+fbsd-libgc.a:
+ make CFLAGS="$(CFLAGS)" clean all
+ mv gc.a fbsd-libgc.a
+
+fbsd-libleak.a:
+ make CFLAGS="$(LEAKFLAGS)" clean all
+ mv gc.a fbsd-libleak.a
+
+FreeBSD-pkg-install: FreeBSD-pkg-all
+ ${CP} fbsd-libgc.a libgc.a
+ ${CP} fbsd-libleak.a libleak.a
+ ${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
# For dynamic library builds, it may be necessary to add flags to generate
# PIC code, e.g. -fPIC on Linux.
@@ -155,7 +182,7 @@
-DDONT_ADD_BYTE_AT_END -DALL_INTERIOR_POINTERS
# Flags for building libgc.a -- the last two are required.
-CXXFLAGS= $(CFLAGS)
+CXXFLAGS+= $(GCFLAGS)
AR= ar
RANLIB= ranlib
@@ -220,8 +247,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 gcconfig.h mach_dep.o $(SRCS)
make -f PCR-Makefile depend
make -f PCR-Makefile
@@ -263,6 +288,12 @@
./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a -ldld `./threadlibs`
./if_not_there test_cpp $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/test_cpp.cc gc_cpp.o gc.a `./threadlibs`
+c++-t: c++
+ ./test_cpp 1
+
+c++-nt: c++
+ @echo "Use ./test_cpp 1 to test the leak library"
+
c++: gc_cpp.o $(srcdir)/gc_cpp.h test_cpp
rm -f dont_ar_4
./if_mach SPARC SUNOS5 touch dont_ar_4
@@ -271,7 +302,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++
dyn_load_sunos53.o: dyn_load.c

View file

@ -1,17 +1,15 @@
--- gc.man.orig Mon Feb 12 14:34:12 1996
+++ gc.man Mon Apr 6 03:23:32 1998
@@ -9,7 +9,9 @@
--- doc/gc.man.orig Mon Oct 8 10:23:01 2001
+++ doc/gc.man Mon Oct 8 10:28:31 2001
@@ -9,7 +9,7 @@
... malloc(...) ...
.br
.sp
-cc ... gc.a
+cc ... -lgc
+.sp
+cc ... -lleak
.LP
.SH DESCRIPTION
.I GC_malloc
@@ -67,6 +69,48 @@
@@ -67,6 +67,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.
.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.
@ -24,10 +22,10 @@
+.I gc_cpp.h
+will probably be found in
+.I /usr/local/include,
+and the libraries in
+and the library in
+.I /usr/local/lib.
+.LP
+These libraries have been compiled as drop-in replacements
+This library has 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
@ -51,7 +49,7 @@
+for the package than this man page;
+look there for more information.
+.LP
+Both libraries are compiled without (explicit) support
+This library is compiled without (explicit) support
+for the experimental
+.I gc
+extension of

View file

@ -1,5 +1,5 @@
--- gc_priv.h.orig Mon Mar 22 11:44:53 1999
+++ gc_priv.h Tue Jul 20 02:31:51 1999
--- include/private/gc_priv.h.orig Mon Mar 22 11:44:53 1999
+++ include/private/gc_priv.h Tue Jul 20 02:31:51 1999
@@ -50,8 +50,13 @@
# endif

View file

@ -1,6 +1,6 @@
--- gcconfig.h.orig Tue Oct 26 15:40:54 1999
+++ gcconfig.h Wed Jul 19 02:07:50 2000
@@ -22,10 +22,23 @@
--- include/private/gcconfig.h.orig Mon Oct 8 10:36:25 2001
+++ include/private/gcconfig.h Mon Oct 8 10:56:43 2001
@@ -23,10 +23,19 @@
/* Machine specific parts contributed by various people. See README file. */
@ -12,20 +12,16 @@
+# if defined(__FreeBSD__)
+# define FREEBSD
+# endif
+# if defined(__NetBSD__)
+# define NETBSD
+# endif
+# if defined(__OpenBSD__)
+# define OPENBSD
+# endif
+# if defined(bsdi)
+# define BSDI
+# endif
+
/* Determine the machine type: */
# if defined(sun) && defined(mc68000)
@@ -38,24 +51,16 @@
/* And one for NetBSD: */
# if defined(__NetBSD__)
@@ -44,25 +53,19 @@
# define HP
# define mach_type_known
# endif
@ -43,26 +39,28 @@
# endif
-# if defined(__NetBSD__) && defined(m68k)
-# define M68K
-# define NETBSD
-# define mach_type_known
-# endif
-# if defined(__NetBSD__) && defined(arm32)
+# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(arm32)
# define ARM32
-# define NETBSD
-# if defined(__NetBSD__) && defined(__powerpc__)
+# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__powerpc__)
# define POWERPC
# define mach_type_known
# endif
# if defined(vax)
@@ -111,7 +116,7 @@
-# if defined(__NetBSD__) && defined(__arm32__)
+# if (defined(__FreeBSD__) || defined(__NetBSD__)) && defined(__arm32__)
# define ARM32
# define mach_type_known
# endif
@@ -125,7 +128,7 @@
# define mach_type_known
# endif
# if defined(sparc) && defined(unix) && !defined(sun) && !defined(linux) \
- && !defined(__OpenBSD__)
+ && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
- && !defined(__OpenBSD__) && !(__NetBSD__)
+ && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !(__NetBSD__)
# define SPARC
# define DRSNX
# define mach_type_known
@@ -147,7 +152,7 @@
@@ -170,7 +173,7 @@
# define I386
# define mach_type_known
# endif
@ -71,46 +69,45 @@
# define IA64
# define mach_type_known
# endif
@@ -165,7 +170,7 @@
@@ -196,7 +199,7 @@
# endif
# if defined(__alpha) || defined(__alpha__)
# define ALPHA
-# if !defined(LINUX)
+# if !defined(LINUX) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
-# if !defined(LINUX) && !defined(NETBSD)
+# if !defined(LINUX) && !defined(__FreeBSD__) && !defined(NETBSD) && !defined(__OpenBSD__)
# define OSF1 /* a.k.a Digital Unix */
# endif
# define mach_type_known
@@ -192,6 +197,9 @@
# define POWERPC
# define mach_type_known
@@ -218,6 +221,9 @@
# define MACOS
# define mach_type_known
# endif
+# if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(bsdi)) && (defined(__powerpc) || defined(__ppc__) || defined(__ppc))
+# define POWERPC
+# endif
# if defined(NeXT) && defined(mc68000)
# define M68K
# define NEXT
@@ -202,26 +210,10 @@
# if defined(macosx) || \
defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
# define MACOSX
@@ -239,25 +245,10 @@
# define NEXT
# define mach_type_known
# endif
-# if defined(__OpenBSD__) && defined(i386)
-# define I386
-# define OPENBSD
-# define mach_type_known
-# endif
-# if defined(__FreeBSD__) && defined(i386)
+# if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)) && (defined(i386) || defined(__i386__))
-# if defined(__OpenBSD__) && (defined(i386) || defined(__i386__))
+# if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)) && (defined(i386) || defined(__i386__))
# define I386
-# define FREEBSD
-# define OPENBSD
# define mach_type_known
# endif
-# if defined(__NetBSD__) && defined(i386)
-# if defined(__FreeBSD__) && (defined(i386) || defined(__i386__))
-# define I386
-# define NETBSD
-# define FREEBSD
-# define mach_type_known
-# endif
-# if defined(bsdi) && defined(i386)
-# if defined(__NetBSD__) && (defined(i386) || defined(__i386__))
-# define I386
-# define mach_type_known
-# endif
-# if defined(bsdi) && (defined(i386) || defined(__i386__))
-# define I386
-# define BSDI
-# define mach_type_known
@ -118,8 +115,8 @@
# if !defined(mach_type_known) && defined(__386BSD__)
# define I386
# define THREE86BSD
@@ -318,7 +310,7 @@
/* (SUNOS4, SUNOS5, */
@@ -391,7 +382,7 @@
/* (SUNOS4, SUNOS5, LINUX, */
/* DRSNX variants) */
/* ALPHA ==> DEC Alpha */
- /* (OSF1 and LINUX variants) */
@ -127,7 +124,7 @@
/* M88K ==> Motorola 88XX0 */
/* (CX_UX and DGUX) */
/* S370 ==> 370-like machine */
@@ -965,6 +957,31 @@
@@ -1262,6 +1253,24 @@
# define CPP_WORDSZ 64
# define MPROTECT_VDB
# define DYNAMIC_LOADING
@ -135,27 +132,20 @@
+# ifdef FREEBSD
+# define OS_TYPE "FREEBSD"
+# define CPP_WORDSZ 64
+# define HEURISTIC2
+# define HEURISTIC2
+# define STACKBOTTOM ((ptr_t) 0x120000000)
+/* # define DATASTART ((ptr_t) 0x140000000) */
+/* # define DATASTART ((ptr_t) 0x140000000) */
+# define DATASTART GC_data_start
+/* # define DYNAMIC_LOADING */
+ extern int _end;
+# define DATAEND (&_end)
+# endif
+# if defined(NETBSD)
+# define OS_TYPE "NETBSD"
+# define CPP_WORDSZ 64
+# define HEURISTIC2
+ extern int _end;
+# define DATAEND (&_end)
+ extern int _end;
+# define DATAEND (&_end)
+# endif
+# if defined(OPENBSD)
+# define OS_TYPE "OPENBSD"
+# define CPP_WORDSZ 64
+# define HEURISTIC2
+ extern int _end;
+# define DATAEND (&_end)
+# define HEURISTIC2
+ extern int _end;
+# define DATAEND (&_end)
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"

View file

@ -1,6 +1,8 @@
--- os_dep.c.orig Wed Jul 19 01:59:57 2000
+++ os_dep.c Wed Jul 19 02:06:27 2000
@@ -81,2 +81,7 @@
--- os_dep.c.orig Mon Oct 8 10:33:42 2001
+++ os_dep.c Mon Oct 8 10:35:32 2001
@@ -84,11 +84,16 @@
# define NEED_FIND_LIMIT
# endif
+# if defined(FREEBSD) && \
+ (defined(POWERPC) || defined(SPARC) || defined(ALPHA) || defined(IA64))
@ -8,8 +10,11 @@
+# endif
+
#ifdef NEED_FIND_LIMIT
@@ -85,3 +90,3 @@
# include <setjmp.h>
#endif
-#ifdef FREEBSD
+#if defined(FREEBSD) && defined(I386)
# include <machine/trap.h>
#endif

View file

@ -1,4 +1,6 @@
include/gc.h
include/gc_cpp.h
lib/libgc.a
lib/libleak.a
lib/libgc.la
lib/libgc.so
lib/libgc.so.1