diff --git a/.gc.metadata b/.gc.metadata new file mode 100644 index 0000000..b3cee09 --- /dev/null +++ b/.gc.metadata @@ -0,0 +1 @@ +b43573800e27361da78f05a2e98394521cfa04fc SOURCES/gc-7.2d.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/gc-7.2c-test-stack-infinite-loop.patch b/SOURCES/gc-7.2c-test-stack-infinite-loop.patch new file mode 100644 index 0000000..49a6046 --- /dev/null +++ b/SOURCES/gc-7.2c-test-stack-infinite-loop.patch @@ -0,0 +1,67 @@ +diff --git a/libatomic_ops/tests/test_atomic.c b/libatomic_ops/tests/test_atomic.c +index e354024..b8906e9 100644 +--- a/libatomic_ops/tests/test_atomic.c ++++ b/libatomic_ops/tests/test_atomic.c +@@ -77,7 +77,10 @@ void * acqrel_thr(void *id) + { + AO_t my_counter1; + if (me != 1) +- fprintf(stderr, "acqrel test: too many threads\n"); ++ { ++ fprintf(stderr, "acqrel test: too many threads\n"); ++ abort(); ++ } + my_counter1 = AO_load(&counter1); + AO_store(&counter1, my_counter1 + 1); + AO_store_release_write(&counter2, my_counter1 + 1); +diff --git a/libatomic_ops/tests/test_malloc.c b/libatomic_ops/tests/test_malloc.c +index a1f4179..a19ffd5 100644 +--- a/libatomic_ops/tests/test_malloc.c ++++ b/libatomic_ops/tests/test_malloc.c +@@ -151,6 +151,7 @@ void * run_one_test(void * arg) { + if (0 == p) { + # ifdef HAVE_MMAP + fprintf(stderr, "AO_malloc(%d) failed\n", LARGE_OBJ_SIZE); ++ abort(); + # else + fprintf(stderr, "AO_malloc(%d) failed: This is normal without mmap\n", + LARGE_OBJ_SIZE); +diff --git a/libatomic_ops/tests/test_stack.c b/libatomic_ops/tests/test_stack.c +index bf3180d..e654c35 100644 +--- a/libatomic_ops/tests/test_stack.c ++++ b/libatomic_ops/tests/test_stack.c +@@ -97,14 +97,23 @@ void check_list(int n) + p = (list_element *)AO_REAL_NEXT_PTR(p -> next)) + { + if (p -> data > n || p -> data <= 0) +- fprintf(stderr, "Found erroneous list element %d\n", p -> data); ++ { ++ fprintf(stderr, "Found erroneous list element %d\n", i); ++ abort(); ++ } + if (marks[p -> data] != 0) +- fprintf(stderr, "Found duplicate list element %d\n", p -> data); ++ { ++ fprintf(stderr, "Found duplicate list element %d\n", i); ++ abort(); ++ } + marks[p -> data] = 1; + } + for (i = 1; i <= n; ++i) + if (marks[i] != 1) +- fprintf(stderr, "Missing list element %d\n", i); ++ { ++ fprintf(stderr, "Missing list element %d\n", i); ++ abort(); ++ } + } + + volatile AO_t ops_performed = 0; +@@ -218,6 +227,7 @@ int main(int argc, char **argv) + int code; + if ((code = pthread_join(thread[i], 0)) != 0) { + fprintf(stderr, "Thread join failed %u\n", code); ++ abort(); + } + } + times[nthreads][exper_n] = (unsigned long)(get_msecs() - start_time); diff --git a/SOURCES/gc-7.2d-aarch64.patch b/SOURCES/gc-7.2d-aarch64.patch new file mode 100644 index 0000000..68b7f92 --- /dev/null +++ b/SOURCES/gc-7.2d-aarch64.patch @@ -0,0 +1,468 @@ +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h +index 767859c..ec92882 100644 +--- a/include/private/gcconfig.h ++++ b/include/private/gcconfig.h +@@ -70,6 +70,13 @@ + # define I386 + # define mach_type_known + # endif ++# if defined(__aarch64__) ++# define AARCH64 ++# if !defined(LINUX) ++# define NOSYS ++# define mach_type_known ++# endif ++# endif + # if defined(__arm) || defined(__arm__) || defined(__thumb__) + # define ARM32 + # if !defined(LINUX) && !defined(NETBSD) && !defined(OPENBSD) \ +@@ -250,6 +257,10 @@ + # define IA64 + # define mach_type_known + # endif ++# if defined(LINUX) && defined(__aarch64__) ++# define AARCH64 ++# define mach_type_known ++# endif + # if defined(LINUX) && (defined(__arm) || defined(__arm__)) + # define ARM32 + # define mach_type_known +@@ -537,6 +548,7 @@ + /* running Amdahl UTS4 */ + /* S390 ==> 390-like machine */ + /* running LINUX */ ++ /* AARCH64 ==> ARM AArch64 */ + /* ARM32 ==> Intel StrongARM */ + /* IA64 ==> Intel IPF */ + /* (e.g. Itanium) */ +@@ -1899,6 +1911,31 @@ + # endif + # endif + ++# ifdef AARCH64 ++# define CPP_WORDSZ 64 ++# define MACH_TYPE "AARCH64" ++# define ALIGNMENT 8 ++# ifndef HBLKSIZE ++# define HBLKSIZE 4096 ++# endif ++# ifdef LINUX ++# define OS_TYPE "LINUX" ++# define LINUX_STACKBOTTOM ++# define DYNAMIC_LOADING ++ extern int __data_start[]; ++# define DATASTART ((ptr_t)__data_start) ++ extern char _end[]; ++# define DATAEND ((ptr_t)(&_end)) ++# endif ++# ifdef NOSYS ++ /* __data_start is usually defined in the target linker script. */ ++ extern int __data_start[]; ++# define DATASTART ((ptr_t)__data_start) ++ extern void *__stack_base__; ++# define STACKBOTTOM ((ptr_t)__stack_base__) ++# endif ++# endif ++ + # ifdef ARM32 + # define CPP_WORDSZ 32 + # define MACH_TYPE "ARM32" +diff --git a/libatomic_ops/src/atomic_ops.h b/libatomic_ops/src/atomic_ops.h +index db177d5..d91da53 100644 +--- a/libatomic_ops/src/atomic_ops.h ++++ b/libatomic_ops/src/atomic_ops.h +@@ -244,6 +244,10 @@ + || defined(__powerpc64__) || defined(__ppc64__) + # include "atomic_ops/sysdeps/gcc/powerpc.h" + # endif /* __powerpc__ */ ++# if defined(__aarch64__) ++# include "atomic_ops/sysdeps/gcc/aarch64.h" ++# define AO_CAN_EMUL_CAS ++# endif /* __aarch64__ */ + # if defined(__arm__) && !defined(AO_USE_PTHREAD_DEFS) + # include "atomic_ops/sysdeps/gcc/arm.h" + # define AO_CAN_EMUL_CAS +diff --git a/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am b/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am +index d8b24dc..b73a20c 100644 +--- a/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am ++++ b/libatomic_ops/src/atomic_ops/sysdeps/Makefile.am +@@ -30,6 +30,7 @@ nobase_sysdep_HEADERS= generic_pthread.h \ + gcc/hexagon.h gcc/hppa.h gcc/ia64.h gcc/m68k.h \ + gcc/mips.h gcc/powerpc.h gcc/s390.h \ + gcc/sh.h gcc/sparc.h gcc/x86.h gcc/x86_64.h \ ++ gcc/aarch64.h \ + \ + hpc/hppa.h hpc/ia64.h \ + \ +diff --git a/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h b/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h +new file mode 100644 +index 0000000..94f1f14 +--- /dev/null ++++ b/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h +@@ -0,0 +1,353 @@ ++/* ++ * Copyright (c) 1991-1994 by Xerox Corporation. All rights reserved. ++ * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. ++ * Copyright (c) 1999-2003 by Hewlett-Packard Company. All rights reserved. ++ * ++ * ++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED ++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. ++ * ++ * Permission is hereby granted to use or copy this program ++ * for any purpose, provided the above notices are retained on all copies. ++ * Permission to modify the code and to distribute modified code is granted, ++ * provided the above notices are retained, and a notice that the code was ++ * modified is included with the above copyright notice. ++ * ++ */ ++ ++#include "../read_ordered.h" ++ ++#include "../test_and_set_t_is_ao_t.h" ++ ++#include "../standard_ao_double_t.h" ++ ++#ifndef AO_UNIPROCESSOR ++ AO_INLINE void ++ AO_nop_write(void) ++ { ++ __asm__ __volatile__("dmb st" : : : "memory"); ++ } ++# define AO_HAVE_nop_write ++#endif ++ ++#ifndef AO_EXPECT_FALSE ++#if __GNUC__ >= 3 && !defined(LINT2) ++# define AO_EXPECT_FALSE(expr) __builtin_expect(expr, 0) ++ /* Equivalent to (expr) but predict that usually (expr) == 0. */ ++#else ++# define AO_EXPECT_FALSE(expr) (expr) ++#endif /* !__GNUC__ */ ++#endif ++ ++/* TODO: Adjust version check on fixing double-wide AO support in GCC. */ ++#if __GNUC__ == 4 ++ ++ AO_INLINE AO_double_t ++ AO_double_load(const volatile AO_double_t *addr) ++ { ++ AO_double_t result; ++ int status; ++ ++ /* Note that STXP cannot be discarded because LD[A]XP is not */ ++ /* single-copy atomic (unlike LDREXD for 32-bit ARM). */ ++ do { ++ __asm__ __volatile__("//AO_double_load\n" ++ " ldxp %0, %1, %3\n" ++ " stxp %w2, %0, %1, %3" ++ : "=&r" (result.AO_val1), "=&r" (result.AO_val2), "=&r" (status) ++ : "Q" (*addr)); ++ } while (AO_EXPECT_FALSE(status)); ++ return result; ++ } ++# define AO_HAVE_double_load ++ ++ AO_INLINE AO_double_t ++ AO_double_load_acquire(const volatile AO_double_t *addr) ++ { ++ AO_double_t result; ++ int status; ++ ++ do { ++ __asm__ __volatile__("//AO_double_load_acquire\n" ++ " ldaxp %0, %1, %3\n" ++ " stxp %w2, %0, %1, %3" ++ : "=&r" (result.AO_val1), "=&r" (result.AO_val2), "=&r" (status) ++ : "Q" (*addr)); ++ } while (AO_EXPECT_FALSE(status)); ++ return result; ++ } ++# define AO_HAVE_double_load_acquire ++ ++ AO_INLINE void ++ AO_double_store(volatile AO_double_t *addr, AO_double_t value) ++ { ++ AO_double_t old_val; ++ int status; ++ ++ do { ++ __asm__ __volatile__("//AO_double_store\n" ++ " ldxp %0, %1, %3\n" ++ " stxp %w2, %4, %5, %3" ++ : "=&r" (old_val.AO_val1), "=&r" (old_val.AO_val2), "=&r" (status), ++ "=Q" (*addr) ++ : "r" (value.AO_val1), "r" (value.AO_val2)); ++ /* Compared to the arm.h implementation, the 'cc' (flags) are not */ ++ /* clobbered because A64 has no concept of conditional execution. */ ++ } while (AO_EXPECT_FALSE(status)); ++ } ++# define AO_HAVE_double_store ++ ++ AO_INLINE void ++ AO_double_store_release(volatile AO_double_t *addr, AO_double_t value) ++ { ++ AO_double_t old_val; ++ int status; ++ ++ do { ++ __asm__ __volatile__("//AO_double_store_release\n" ++ " ldxp %0, %1, %3\n" ++ " stlxp %w2, %4, %5, %3" ++ : "=&r" (old_val.AO_val1), "=&r" (old_val.AO_val2), "=&r" (status), ++ "=Q" (*addr) ++ : "r" (value.AO_val1), "r" (value.AO_val2)); ++ } while (AO_EXPECT_FALSE(status)); ++ } ++# define AO_HAVE_double_store_release ++ ++ AO_INLINE int ++ AO_double_compare_and_swap(volatile AO_double_t *addr, ++ AO_double_t old_val, AO_double_t new_val) ++ { ++ AO_double_t tmp; ++ int result = 1; ++ ++ do { ++ __asm__ __volatile__("//AO_double_compare_and_swap\n" ++ " ldxp %0, %1, %2\n" ++ : "=&r" (tmp.AO_val1), "=&r" (tmp.AO_val2) ++ : "Q" (*addr)); ++ if (tmp.AO_val1 != old_val.AO_val1 || tmp.AO_val2 != old_val.AO_val2) ++ break; ++ __asm__ __volatile__( ++ " stxp %w0, %2, %3, %1\n" ++ : "=&r" (result), "=Q" (*addr) ++ : "r" (new_val.AO_val1), "r" (new_val.AO_val2)); ++ } while (AO_EXPECT_FALSE(result)); ++ return !result; ++ } ++# define AO_HAVE_double_compare_and_swap ++ ++ AO_INLINE int ++ AO_double_compare_and_swap_acquire(volatile AO_double_t *addr, ++ AO_double_t old_val, AO_double_t new_val) ++ { ++ AO_double_t tmp; ++ int result = 1; ++ ++ do { ++ __asm__ __volatile__("//AO_double_compare_and_swap_acquire\n" ++ " ldaxp %0, %1, %2\n" ++ : "=&r" (tmp.AO_val1), "=&r" (tmp.AO_val2) ++ : "Q" (*addr)); ++ if (tmp.AO_val1 != old_val.AO_val1 || tmp.AO_val2 != old_val.AO_val2) ++ break; ++ __asm__ __volatile__( ++ " stxp %w0, %2, %3, %1\n" ++ : "=&r" (result), "=Q" (*addr) ++ : "r" (new_val.AO_val1), "r" (new_val.AO_val2)); ++ } while (AO_EXPECT_FALSE(result)); ++ return !result; ++ } ++# define AO_HAVE_double_compare_and_swap_acquire ++ ++ AO_INLINE int ++ AO_double_compare_and_swap_release(volatile AO_double_t *addr, ++ AO_double_t old_val, AO_double_t new_val) ++ { ++ AO_double_t tmp; ++ int result = 1; ++ ++ do { ++ __asm__ __volatile__("//AO_double_compare_and_swap_release\n" ++ " ldxp %0, %1, %2\n" ++ : "=&r" (tmp.AO_val1), "=&r" (tmp.AO_val2) ++ : "Q" (*addr)); ++ if (tmp.AO_val1 != old_val.AO_val1 || tmp.AO_val2 != old_val.AO_val2) ++ break; ++ __asm__ __volatile__( ++ " stlxp %w0, %2, %3, %1\n" ++ : "=&r" (result), "=Q" (*addr) ++ : "r" (new_val.AO_val1), "r" (new_val.AO_val2)); ++ } while (AO_EXPECT_FALSE(result)); ++ return !result; ++ } ++# define AO_HAVE_double_compare_and_swap_release ++#endif ++ ++AO_INLINE void ++AO_nop_full(void) ++{ ++# ifndef AO_UNIPROCESSOR ++__sync_synchronize (); ++# endif ++} ++#define AO_HAVE_nop_full ++ ++AO_INLINE AO_t ++AO_load(const volatile AO_t *addr) ++{ ++ return (AO_t)__atomic_load_n (addr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_load ++ ++AO_INLINE AO_t ++AO_load_acquire(const volatile AO_t *addr) ++{ ++ return (AO_t)__atomic_load_n (addr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_load_acquire ++ ++AO_INLINE void ++ AO_store(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_store ++ ++AO_INLINE void ++ AO_store_release(volatile AO_t *addr, AO_t value) ++{ ++ __atomic_store_n(addr, value, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_store_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set(volatile AO_TS_t *addr) ++{ ++ return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELAXED); ++} ++# define AO_HAVE_test_and_set ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_acquire(volatile AO_TS_t *addr) ++{ ++ return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_ACQUIRE); ++} ++# define AO_HAVE_test_and_set_acquire ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_release(volatile AO_TS_t *addr) ++{ ++ return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_RELEASE); ++} ++# define AO_HAVE_test_and_set_release ++ ++AO_INLINE AO_TS_VAL_t ++AO_test_and_set_full(volatile AO_TS_t *addr) ++{ ++ return (AO_TS_VAL_t)__atomic_test_and_set(addr, __ATOMIC_SEQ_CST); ++} ++# define AO_HAVE_test_and_set_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add(volatile AO_t *p, AO_t incr) ++{ ++ return (AO_t)__atomic_fetch_add(p, incr, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add ++ ++AO_INLINE AO_t ++AO_fetch_and_add_acquire(volatile AO_t *p, AO_t incr) ++{ ++ return (AO_t)__atomic_fetch_add(p, incr, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add_release(volatile AO_t *p, AO_t incr) ++{ ++ return (AO_t)__atomic_fetch_add(p, incr, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add_full(volatile AO_t *p, AO_t incr) ++{ ++ return (AO_t)__atomic_fetch_add(p, incr, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add_full ++ ++AO_INLINE AO_t ++AO_fetch_and_add1(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_add(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_add1 ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_acquire(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_add(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_add1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_release(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_add(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_add1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_add1_full(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_add(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_add1_full ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_sub(p, 1, __ATOMIC_RELAXED); ++} ++#define AO_HAVE_fetch_and_sub1 ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_acquire(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_sub(p, 1, __ATOMIC_ACQUIRE); ++} ++#define AO_HAVE_fetch_and_sub1_acquire ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_release(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_sub(p, 1, __ATOMIC_RELEASE); ++} ++#define AO_HAVE_fetch_and_sub1_release ++ ++AO_INLINE AO_t ++AO_fetch_and_sub1_full(volatile AO_t *p) ++{ ++ return (AO_t)__atomic_fetch_sub(p, 1, __ATOMIC_SEQ_CST); ++} ++#define AO_HAVE_fetch_and_sub1_full ++ ++/* Returns nonzero if the comparison succeeded. */ ++AO_INLINE int ++AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return (int)__sync_bool_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_compare_and_swap ++ ++AO_INLINE AO_t ++AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val) ++{ ++ return (AO_t)__sync_val_compare_and_swap(addr, old_val, new_val); ++} ++# define AO_HAVE_fetch_compare_and_swap ++ ++ ++ ++#include "../../generalize.h" +diff --git a/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h b/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h +index 7089f05..de726fc 100644 +--- a/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h ++++ b/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h +@@ -11,6 +11,8 @@ + typedef __m128 double_ptr_storage; + #elif defined(_WIN32) && !defined(__GNUC__) + typedef unsigned __int64 double_ptr_storage; ++#elif defined(__aarch64__) ++ typedef unsigned __int128 double_ptr_storage; + #else + typedef unsigned long long double_ptr_storage; + #endif diff --git a/SPECS/gc.spec b/SPECS/gc.spec new file mode 100644 index 0000000..9672e8e --- /dev/null +++ b/SPECS/gc.spec @@ -0,0 +1,348 @@ +Summary: A garbage collector for C and C++ +Name: gc +%global base_ver 7.2 +Version: 7.2d +Release: 4%{?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}%{?pre}.tar.gz +Patch1: gc-7.2c-test-stack-infinite-loop.patch +Patch2: gc-7.2d-aarch64.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +## upstreamable patches + +## upstream patches + +BuildRequires: automake libtool +BuildRequires: pkgconfig + +# rpmforge compatibility +Obsoletes: libgc < %{version}-%{release} +Provides: libgc = %{version}-%{release} + +%description +The Boehm-Demers-Weiser conservative garbage collector can be +used as a garbage collecting replacement for C malloc or C++ new. + +%package devel +Summary: Libraries and header files for %{name} development +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: libgc-devel < %{version}-%{release} +Provides: libgc-devel = %{version}-%{release} +%description devel +%{summary}. + +%package -n libatomic_ops-devel +Summary: Atomic memory update operations +Group: Development/Libraries +# libatomic_ops.a is MIT +# libatomic_ops_gpl.a is GPLv2+ +License: MIT and GPLv2+ +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 -n gc-%{base_ver}%{?pre} +%patch1 -p1 -b .infinite-loop-in-tests +%patch2 -p1 -b .aarch64 + +# refresh auto*/libtool to purge rpaths +rm -f libtool libtool.m4 +autoreconf -i -f + + +%build + +# see bugzilla.redhat.com/689877 +CPPFLAGS="-DUSE_GET_STACKBASE_FOR_MAIN"; export CPPFLAGS + +%configure \ + --disable-dependency-tracking \ + --disable-static \ + --enable-cplusplus \ + --enable-large-config \ +%ifarch %{ix86} + --enable-parallel-mark \ +%endif + --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 -rfv %{buildroot}%{_datadir}/gc/ +rm -rfv %{buildroot}%{_datadir}/libatomic_ops/{COPYING,*.txt} +rm -fv %{buildroot}%{_libdir}/lib*.la + + +%check +make check +# ignore results on powerpc - the atomic stack feature is not working correctly +# there (#883748) +%ifarch ppc ppc64 +%global arch_ignore ||: +%endif +make check -C libatomic_ops %{?arch_ignore} + + +%clean +rm -rf %{buildroot} + + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc doc/README +%doc doc/README.changes doc/README.contributors +%doc doc/README.environment doc/README.linux +%{_libdir}/libcord.so.1* +%{_libdir}/libgc.so.1* +%{_libdir}/libgccpp.so.1* + +%files devel +%defattr(-,root,root,-) +%doc doc/*.html +%{_includedir}/gc.h +%{_includedir}/gc_cpp.h +%{_includedir}/gc/ +%{_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/ +%{_libdir}/libatomic_ops.a +%{_libdir}/pkgconfig/atomic_ops.pc +# GPLv2+ bits +%{_includedir}/atomic_ops_malloc.h +%{_includedir}/atomic_ops_stack.h +%{_libdir}/libatomic_ops_gpl.a + + +%changelog +* Wed Oct 30 2013 Pavel Raiskup - 7.2d-4 +- add support for aarch64 (#969817) +- ignore testsuite results only for powerpc + +* Sat Aug 03 2013 Fedora Release Engineering - 7.2d-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 7.2d-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Jan 07 2013 Rex Dieter 7.2d-1 +- gc-7.2d + +* Mon Oct 29 2012 Pavel Raiskup - 7.2c-5 +- fix possible infinite loop in test suite (#871067) + +* Mon Oct 29 2012 Pavel Raiskup - 7.2c-4 +- trim lines, s/[tabs]/[spaces]/ + +* Fri Jul 27 2012 Fedora Release Engineering - 7.2c-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 24 2012 Rex Dieter 7.2c-2 +- rebuild + +* Tue Jun 26 2012 Rex Dieter 7.2c-1 +- 7.2c + +* Fri Jun 15 2012 Rex Dieter +- 7.2b-2 +- backport patches from gc-7_2-hotfix-2 branch in lieu of 7.2c release +- gc 7.2 final abi broken when changing several symbols to hidden (#825473) +- CVE-2012-2673 gc: malloc() and calloc() overflows (#828878) + +* Wed May 30 2012 Rex Dieter 7.2b-1 +- gc-7.2b + +* Mon May 14 2012 Rex Dieter +- 7.2-1 +- gc-7.2 (final) + +* Fri Mar 02 2012 Rex Dieter 7.2-0.7.alpha6 +- libatomic_ops: use -DAO_USE_PTHREAD_DEFS on ARMv5 + +* Fri Jan 13 2012 Fedora Release Engineering - 7.2-0.6.alpha6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Oct 26 2011 Fedora Release Engineering - 7.2-0.5.alpha6 +- Rebuilt for glibc bug#747377 + +* Mon Jun 20 2011 Rex Dieter 7.2-0.4.alpha6.20110107 +- gc-7.2alpha6 +- build with -DUSE_GET_STACKBASE_FOR_MAIN (#689877) + +* Wed Feb 09 2011 Rex Dieter 7.2-0.3.alpha5.20110107 +- bdwgc-7.2alpha4 20110107 snapshot + +* Tue Feb 08 2011 Fedora Release Engineering - 7.2-0.2.alpha4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Dec 11 2009 Rex Dieter - 7.2-0.1.alpha4 +- gc-7.2alpha4 +- use/package internal libatomic_ops + +* Tue Dec 8 2009 Michael Schwendt - 7.1-10 +- Explicitly BR libatomic_ops-static in accordance with the Packaging + Guidelines (libatomic_ops-devel is still static-only). + +* Fri Jul 24 2009 Fedora Release Engineering - 7.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sun Jul 19 2009 Rex Dieter - 7.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Dec 12 2008 Rex Dieter 7.1-6 +- rebuild for pkgconfig deps + +* Wed Oct 15 2008 Rex Dieter 7.1-5 +- forward-port patches (gcinit, sparc) + +* Fri Oct 03 2008 Rex Dieter 7.1-4 +- BR: libatomic_ops-devel + +* Mon Sep 08 2008 Rex Dieter 7.1-3 +- upstream DONT_ADD_BYTE_AT_END patch +- spec cosmetics + +* Sat Jul 12 2008 Rex Dieter 7.1-2 +- --enable-large-config (#453972) + +* Sun May 04 2008 Rex Dieter 7.1-1 +- gc-7.1 +- purge rpaths + +* Fri Feb 08 2008 Rex Dieter 7.0-7 +- respin (gcc43) + +* Wed Aug 29 2007 Rex Dieter 7.0-6 +- BR: gawk +- fixup compat_header patch to avoid needing auto* tools + +* Wed Aug 29 2007 Rex Dieter 7.0-5 +- compat_header patch (supercedes previous pkgconfig patch) + +* Tue Aug 21 2007 Rex Dieter 7.0-4 +- pkgconfig patch (cflags += -I%%_includedir/gc) + +* Tue Aug 21 2007 Rex Dieter 7.0-3 +- respin (ppc32) + +* Tue Jul 24 2007 Rex Dieter 7.0-2 +- gcinit patch, ABI compatibility (#248700) + +* Mon Jul 09 2007 Rex Dieter 7.0-1 +- gc-7.0 + +* Mon Dec 11 2006 Rex Dieter 6.8-3 +- Obsoletes/Provides: libgc(-devel) (rpmforge compatibility) + +* Mon Aug 28 2006 Rex Dieter 6.8-2 +- fc6 respin + +* Thu Jul 13 2006 Rex Dieter 6.8-1 +- 6.8 + +* Fri Mar 03 2006 Rex Dieter 6.7-1 +- 6.7 + +* Wed Mar 1 2006 Rex Dieter +- fc5: gcc/glibc respin + +* Fri Feb 10 2006 Rex Dieter 6.6-5 +- gcc(4.1) patch + +* Thu Dec 01 2005 Rex Dieter 6.6-4 +- Provides: libgc(-devel) + +* Wed Sep 14 2005 Rex Dieter 6.6-3 +- no-undefined patch, libtool madness (#166344) + +* Mon Sep 12 2005 Rex Dieter 6.6-2 +- drop opendl patch (doesn't appear to be needed anymore) + +* Fri Sep 09 2005 Rex Dieter 6.6-1 +- 6.6 + +* Wed May 25 2005 Rex Dieter 6.5-1 +- 6.5 + +* Wed Apr 6 2005 Michael Schwendt +- rebuilt + +* Wed Jan 26 2005 Rex Dieter 0:6.4-2 +- --enable-threads unconditionally +- --enable-parallel-mark only on %%ix86 (#144681) + +* Mon Jan 10 2005 Rex Dieter 0:6.4-1 +- 6.4 +- update opendl patch + +* Fri Jul 09 2004 Rex Dieter 0:6.3-0.fdr.1 +- 6.3(final) + +* Tue Jun 01 2004 Rex Dieter 0:6.3-0.fdr.0.4.alpha6 +- dlopen patch + +* Wed May 26 2004 Rex Dieter 0:6.3-0.fdr.0.3.alpha6 +- explictly --enable-threads ('n friends) + +* Tue May 25 2004 Rex Dieter 0:6.3-0.fdr.0.2.alpha6 +- 6.3alpha6 +- --disable-static +- --enable-parallel-mark + +* Wed Dec 17 2003 Rex Dieter 0:6.3-0.fdr.0.1.alpha2 +- 6.3alpha2 + +* Thu Oct 02 2003 Rex Dieter 0:6.2-0.fdr.3 +- OK, put manpage in man3. + +* Thu Oct 02 2003 Rex Dieter 0:6.2-0.fdr.2 +- drop manpage pending feedback from developer. + +* Tue Sep 30 2003 Rex Dieter 0:6.2-0.fdr.1 +- fix manpage location +- remove .la file (it appears unnecessary after all, thanks to opendl patch) +- remove cvs tag from description +- touchup -devel desc/summary. +- macro update to support Fedora Core + +* Thu Sep 11 2003 Rex Dieter 0:6.2-0.fdr.0 +- 6.2 release. +- update license (BSD) +- Consider building with: --enable-parallel-mark + (for now, no).