enable futexes for arm

This commit is contained in:
Tom Callaway 2015-06-01 15:49:16 -04:00
parent add00bf49e
commit 2bec3a5226
2 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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 <spot@fedoraproject.org> - 2.4-3
- enable futex for ARM
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.4-2
- Rebuilt for GCC 5 C++11 ABI change