From b96d668cc96571724fc4770bc587c6f42dc4cf82 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Apr 2012 00:29:51 -0500 Subject: [PATCH] no attomics on armv5tel --- jemalloc-armv5-force-atomic.patch | 11 +++++++++++ jemalloc.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 jemalloc-armv5-force-atomic.patch diff --git a/jemalloc-armv5-force-atomic.patch b/jemalloc-armv5-force-atomic.patch new file mode 100644 index 0000000..5674228 --- /dev/null +++ b/jemalloc-armv5-force-atomic.patch @@ -0,0 +1,11 @@ +--- jemalloc-2.2.5/include/jemalloc/internal/atomic.h.orig 2012-04-21 00:24:23.000000000 -0400 ++++ jemalloc-2.2.5/include/jemalloc/internal/atomic.h 2012-04-21 00:50:41.000000000 -0400 +@@ -105,7 +105,7 @@ + + /******************************************************************************/ + /* 32-bit operations. */ +-#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ++#if ( defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) || defined(__ARM_ARCH_5T__) ) + JEMALLOC_INLINE uint32_t + atomic_add_uint32(uint32_t *p, uint32_t x) + { diff --git a/jemalloc.spec b/jemalloc.spec index 7dca362..513e588 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -1,7 +1,7 @@ Name: jemalloc Version: 2.2.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: General-purpose scalable concurrent malloc implementation Group: System Environment/Libraries @@ -14,6 +14,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: jemalloc-2.2.2.no_pprof.patch # check for __s390__ as it's defined on both s390 and s390x Patch1: jemalloc-2.0.1-s390.patch +# ARMv5tel has no atomic operations +Patch2: jemalloc-armv5-force-atomic.patch BuildRequires: /usr/bin/xsltproc @@ -34,6 +36,7 @@ developing applications that use %{name}. %setup -q %patch0 %patch1 -p1 -b .s390 +%patch2 -p1 -b .armv5tel %build %configure @@ -71,6 +74,9 @@ rm -rf %{buildroot} %postun -p /sbin/ldconfig %changelog +* Fri Apr 20 2012 Dennis Gilmore - 2.2.5-4 +- no attomics on armv5tel + * Wed Feb 08 2012 Dan HorĂ¡k - 2.2.5-3 - substitute version information in the header (#788517)