[ceph] fix building on ARM
Peter Robinson
pbrobinson at fedoraproject.org
Wed Apr 4 19:49:46 UTC 2012
commit 563583e5c03cf0a4506179e1e92f583b90b3f743
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Wed Apr 4 20:49:36 2012 +0100
fix building on ARM
ceph.spec | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/ceph.spec b/ceph.spec
index 705c0f2..4d697f6 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -1,6 +1,6 @@
Name: ceph
Version: 0.44
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: User space components of the Ceph file system
License: LGPLv2
Group: System Environment/Base
@@ -22,7 +22,7 @@ BuildRequires: gperftools-devel
BuildRequires: cryptopp-devel, libatomic_ops-devel, gcc-c++
BuildRequires: pkgconfig, libcurl-devel, keyutils-libs-devel
BuildRequires: gtkmm24-devel, gtk2-devel, libuuid, libuuid-devel
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
Requires(post): chkconfig, binutils, libedit
Requires(preun): chkconfig
Requires(preun): initscripts
@@ -88,18 +88,29 @@ file system.
%build
./autogen.sh
+
+%ifarch armv5tel
+# libatomic_ops does not have correct asm for ARMv5tel
+EXTRA_CFLAGS="-DAO_USE_PTHREAD_DEFS"
+%endif
+%ifarch %{arm}
+# libatomic_ops seems to fallback on some pthread implementation on ARM
+EXTRA_LDFLAGS="-lpthread"
+%endif
+
%{configure} --prefix=/usr --sbindir=/sbin \
--localstatedir=/var --sysconfdir=/etc \
%ifarch ppc ppc64 s390 s390x
--without-tcmalloc \
%endif
--without-hadoop --with-radosgw --with-gtk2 \
-CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
+CFLAGS="$RPM_OPT_FLAGS $EXTRA_CFLAGS" \
+CXXFLAGS="$RPM_OPT_FLAGS $EXTRA_CFLAGS" \
+LDFLAGS="$EXTRA_LDFLAGS"
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
@@ -112,9 +123,6 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ceph/stat
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post
/sbin/ldconfig
/sbin/chkconfig --add ceph
@@ -245,6 +253,10 @@ fi
%{_bindir}/boto_tool
%changelog
+* Wed Apr 4 2012 Niels de Vos <devos at fedoraproject.org> - 0.44-5
+- Add LDFLAGS=-lpthread on any ARM architecture
+- Add CFLAGS=-DAO_USE_PTHREAD_DEFS on ARMv5tel
+
* Mon Mar 26 2012 Dan HorĂ¡k <dan[at]danny.cz> 0.44-4
- gperftools not available also on ppc
More information about the scm-commits
mailing list