- gc-7.2alpha4

- use/package internal libatomic_ops
This commit is contained in:
Rex Dieter 2009-12-11 13:51:51 +00:00
parent a81866d9e7
commit 57c253c2ed
6 changed files with 53 additions and 119 deletions

View File

@ -1 +1 @@
gc-7.1.tar.gz
gc-7.2alpha4.tar.gz

View File

@ -1,23 +0,0 @@
diff -up gc-7.1/thread_local_alloc.c.dont_add_byte gc-7.1/thread_local_alloc.c
--- gc-7.1/thread_local_alloc.c.dont_add_byte 2007-10-24 19:22:37.000000000 -0500
+++ gc-7.1/thread_local_alloc.c 2008-09-08 06:53:20.000000000 -0500
@@ -291,14 +291,16 @@ void GC_mark_thread_local_fls_for(GC_tlf
ptr_t q;
int j;
- for (j = 1; j < TINY_FREELISTS; ++j) {
+ for (j = 0; j < TINY_FREELISTS; ++j) {
q = p -> ptrfree_freelists[j];
if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
q = p -> normal_freelists[j];
if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
# ifdef GC_GCJ_SUPPORT
- q = p -> gcj_freelists[j];
- if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
+ if (j > 0) {
+ q = p -> gcj_freelists[j];
+ if ((word)q > HBLKSIZE) GC_set_fl_marks(q);
+ }
# endif /* GC_GCJ_SUPPORT */
}
}

View File

@ -1,26 +0,0 @@
diff -up gc-7.1/thread_local_alloc.c.gcinit gc-7.1/thread_local_alloc.c
--- gc-7.1/thread_local_alloc.c.gcinit 2007-10-24 19:22:37.000000000 -0500
+++ gc-7.1/thread_local_alloc.c 2008-10-15 07:13:45.000000000 -0500
@@ -141,6 +141,9 @@ void * GC_malloc(size_t bytes)
void *result;
void **tiny_fl;
+ if (!GC_is_initialized)
+ GC_init();
+
# if !defined(USE_PTHREAD_SPECIFIC) && !defined(USE_WIN32_SPECIFIC)
GC_key_t k = GC_thread_key;
if (EXPECT(0 == k, 0)) {
diff -up gc-7.1/malloc.c.gcinit gc-7.1/malloc.c
--- gc-7.1/malloc.c.gcinit 2008-03-10 00:33:41.000000000 -0500
+++ gc-7.1/malloc.c 2008-10-15 07:12:31.000000000 -0500
@@ -263,6 +263,9 @@ void * GC_generic_malloc(size_t lb, int
size_t lg;
DCL_LOCK_STATE;
+ if (!GC_is_initialized)
+ GC_init();
+
if(SMALL_OBJ(lb)) {
lg = GC_size_map[lb];
opp = (void **)&(GC_objfreelist[lg]);

View File

@ -1,41 +0,0 @@
diff -up gc-7.1/configure.sparc gc-7.1/configure
--- gc-7.1/configure.sparc 2008-05-03 19:52:50.000000000 -0500
+++ gc-7.1/configure 2008-10-15 07:01:18.000000000 -0500
@@ -6161,6 +6161,9 @@ _ACEOF
sparc-*-netbsd*)
machdep="mach_dep.lo sparc_netbsd_mach_dep.lo"
;;
+ sparc*-*-linux*)
+ machdep="mach_dep.lo sparc_mach_dep.lo"
+ ;;
sparc-sun-solaris2.3)
machdep="mach_dep.lo sparc_mach_dep.lo"
cat >>confdefs.h <<\_ACEOF
diff -up gc-7.1/configure.ac.sparc gc-7.1/configure.ac
--- gc-7.1/configure.ac.sparc 2008-05-03 19:52:06.000000000 -0500
+++ gc-7.1/configure.ac 2008-10-15 07:01:18.000000000 -0500
@@ -405,6 +405,9 @@ case "$host" in
sparc-*-netbsd*)
machdep="mach_dep.lo sparc_netbsd_mach_dep.lo"
;;
+ sparc*-*-linux*)
+ machdep="mach_dep.lo sparc_mach_dep.lo"
+ ;;
sparc-sun-solaris2.3)
machdep="mach_dep.lo sparc_mach_dep.lo"
AC_DEFINE(SUNOS53_SHARED_LIB)
diff -up gc-7.1/mach_dep.c.sparc gc-7.1/mach_dep.c
--- gc-7.1/mach_dep.c.sparc 2007-08-13 16:49:11.000000000 -0500
+++ gc-7.1/mach_dep.c 2008-10-15 07:03:35.000000000 -0500
@@ -175,9 +175,10 @@ void GC_with_callee_saves_pushed(void (*
# if defined(HAVE_PUSH_REGS)
GC_push_regs();
# elif defined(UNIX_LIKE) && !defined(DARWIN) && !defined(ARM32) && \
- !defined(HURD)
+ !defined(HURD) && !defined(SPARC)
/* Older versions of Darwin seem to lack getcontext(). */
/* ARM Linux often doesn't support a real getcontext(). */
+ /* SPARC 32bit Linux doesn't support getcontext(). */
ucontext_t ctxt;
if (getcontext(&ctxt) < 0)
ABORT ("Getcontext failed: Use another register retrieval method?");

78
gc.spec
View File

@ -1,28 +1,24 @@
%define pre alpha4
Summary: A garbage collector for C and C++
Name: gc
Version: 7.1
Version: 7.2
Release: 0.1.%{pre}%{?dist}
Release: 10%{?dist}
Group: System Environment/Libraries
License: BSD
Url: http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Source0: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-%{version}.tar.gz
Source0: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-%{version}%{?pre}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# To be more backward-compatible abi-wise, TODO: upstream ml reference
Patch1: gc-7.1-gcinit.patch
Patch3: gc-7.1-sparc.patch
## upstreamable patches
Patch50: gc-7.1-dup_cpp_headers.patch
Patch51: gc-7.2alpha4-install_dups.patch
## upstream patches
# http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2008-May/002206.html
Patch100: gc-7.1-dont_add_byte.patch
BuildRequires: automake libtool
BuildRequires: libatomic_ops-static libatomic_ops-devel
BuildRequires: pkgconfig
# rpmforge compatibility
@ -43,23 +39,26 @@ Provides: libgc-devel = %{version}-%{release}
%description devel
%{summary}.
%package -n libatomic_ops-devel
Summary: Atomic memory update operations
Group: Development/Libraries
Provides: libatomic_ops-static = %{version}-%{release}
%description -n libatomic_ops-devel
Provides implementations for atomic memory update operations on a
number of architectures. This allows direct use of these in reasonably
portable code. Unlike earlier similar packages, this one explicitly
considers memory barrier semantics, and allows the construction of code
that involves minimum overhead across a variety of architectures.
%prep
%setup -q
# FIXME? -- Rex
%if 0%{?rhel} < 6 && 0%{?fedora} < 10
%patch1 -p1 -b .gcinit
%endif
%patch3 -p1 -b .sparc
%setup -q -n gc-%{version}%{?pre}
%patch50 -p1 -b .dup_cpp_headers
%patch100 -p1 -b .dont_add_byte
%patch51 -p1 -b .install_dups
# refresh auto*/libtool to purge rpaths
rm -f libtool libtool.m4
libtoolize --force
autoreconf -i
@ -73,25 +72,30 @@ autoreconf -i
%ifarch %{ix86}
--enable-parallel-mark \
%endif
--enable-threads=posix
--enable-threads=posix \
--with-libatomic-ops=no
make %{?_smp_mflags}
make %{?_smp_mflags} -C libatomic_ops
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
make install DESTDIR=%{buildroot} -C libatomic_ops
install -p -D -m644 doc/gc.man %{buildroot}%{_mandir}/man3/gc.3
## Unpackaged files
rm -rf %{buildroot}%{_datadir}/gc
rm -rf %{buildroot}%{_datadir}/gc/
rm -rf %{buildroot}%{_datadir}/libatomic_ops/{COPYING,*.txt}
rm -f %{buildroot}%{_libdir}/lib*.la
%check
make check
make check -C libatomic_ops
%clean
@ -108,19 +112,39 @@ rm -rf %{buildroot}
%doc doc/README
%doc doc/README.changes doc/README.contributors
%doc doc/README.environment doc/README.linux
%{_libdir}/lib*.so.*
%{_libdir}/libcord.so.1*
%{_libdir}/libgc.so.1*
%{_libdir}/libgccpp.so.1*
%files devel
%defattr(-,root,root,-)
%doc doc/*.html
%{_includedir}/*.h
%{_includedir}/gc.h
%{_includedir}/gc_cpp.h
%{_includedir}/gc/
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_mandir}/man?/*
%{_libdir}/libcord.so
%{_libdir}/libgc.so
%{_libdir}/libgccpp.so
%{_libdir}/pkgconfig/bdw-gc.pc
%{_mandir}/man3/gc.3*
%files -n libatomic_ops-devel
%defattr(-,root,root,-)
%doc libatomic_ops/AUTHORS libatomic_ops/ChangeLog libatomic_ops/COPYING libatomic_ops/NEWS libatomic_ops/README
%doc libatomic_ops/doc/*.txt
%{_includedir}/atomic_ops.h
%{_includedir}/atomic_ops_malloc.h
%{_includedir}/atomic_ops_stack.h
%{_includedir}/atomic_ops/
%{_libdir}/libatomic_ops.a
%{_libdir}/libatomic_ops_gpl.a
%changelog
* Fri Dec 11 2009 Rex Dieter <rdieter@fedoraproject.org> - 7.2-0.1.alpha4
- gc-7.2alpha4
- use/package internal libatomic_ops
* Tue Dec 8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 7.1-10
- Explicitly BR libatomic_ops-static in accordance with the Packaging
Guidelines (libatomic_ops-devel is still static-only).

View File

@ -1 +1 @@
2ff9924c7249ef7f736ecfe6f08f3f9b gc-7.1.tar.gz
0a6785ebb61c6e2b50c3952c3bbf9ea1 gc-7.2alpha4.tar.gz