diff --git a/gperftools-arm-has-futex.patch b/gperftools-arm-has-futex.patch new file mode 100644 index 0000000..be22287 --- /dev/null +++ b/gperftools-arm-has-futex.patch @@ -0,0 +1,17 @@ +diff -up gperftools-2.4/src/base/spinlock_linux-inl.h.armfutex gperftools-2.4/src/base/spinlock_linux-inl.h +--- gperftools-2.4/src/base/spinlock_linux-inl.h.armfutex 2015-06-01 15:46:32.129618825 -0400 ++++ gperftools-2.4/src/base/spinlock_linux-inl.h 2015-06-01 15:46:55.081459716 -0400 +@@ -51,13 +51,8 @@ static struct InitModule { + int x = 0; + // futexes are ints, so we can use them only when + // that's the same size as the lockword_ in SpinLock. +-#ifdef __arm__ +- // ARM linux doesn't support sys_futex1(void*, int, int, struct timespec*); +- have_futex = 0; +-#else + have_futex = (sizeof (Atomic32) == sizeof (int) && + sys_futex(&x, FUTEX_WAKE, 1, 0) >= 0); +-#endif + if (have_futex && + sys_futex(&x, FUTEX_WAKE | futex_private_flag, 1, 0) < 0) { + futex_private_flag = 0; diff --git a/gperftools.spec b/gperftools.spec index 19c3e70..26f4add 100644 --- a/gperftools.spec +++ b/gperftools.spec @@ -4,12 +4,13 @@ Name: gperftools Version: 2.4 -Release: 2%{?dist} +Release: 3%{?dist} License: BSD Group: Development/Tools Summary: Very fast malloc and performance analysis tools URL: http://code.google.com/p/gperftools/ Source0: https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/%{name}-%{version}.tar.gz +Patch0: gperftools-arm-has-futex.patch ExcludeArch: s390 s390x %ifnarch ppc %{power64} BuildRequires: libunwind-devel @@ -56,6 +57,7 @@ Pprof is a heap and CPU profiler tool, part of the gperftools suite. %prep %setup -q +%patch0 -p1 -b .armfutex # Fix end-of-line encoding sed -i 's/\r//' README_windows.txt @@ -108,6 +110,9 @@ rm -rf %{buildroot}%{_pkgdocdir}/INSTALL %{_libdir}/*.so.* %changelog +* Mon Jun 1 2015 Tom Callaway - 2.4-3 +- enable futex for ARM + * Sat May 02 2015 Kalev Lember - 2.4-2 - Rebuilt for GCC 5 C++11 ABI change