From df44cf0e475e5d8c49ef393d1c4d73f404a36c46 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 1 Mar 2012 18:51:55 +0100 Subject: [PATCH] define AO_USE_PTHREAD_DEFS for armv5tel Fix building on armv5tel where libatomic_ops-devel does not define AO_fetch_and_add1() and similar. This should probably be fixed in gc, which provides the libatomic_ops-devel subpackage. ./include/atomic.h: In member function 'size_t ceph::atomic_t::inc()': ./include/atomic.h:40:36: error: 'AO_fetch_and_add1' was not declared in this scope ./include/atomic.h: In member function 'size_t ceph::atomic_t::dec()': ./include/atomic.h:43:42: error: 'AO_fetch_and_sub1_write' was not declared in this scope ... Signed-off-by: Niels de Vos --- ceph.spec | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ceph.spec b/ceph.spec index 0810e37..918ffa6 100644 --- a/ceph.spec +++ b/ceph.spec @@ -1,6 +1,6 @@ Name: ceph Version: 0.41 -Release: 2%{?dist} +Release: 2%{?dist}.0.arm1 Summary: User space components of the Ceph file system License: LGPLv2 Group: System Environment/Base @@ -93,7 +93,17 @@ file system. --without-tcmalloc \ %endif --without-hadoop --with-radosgw --with-gtk2 -make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" + +%ifarch %arm +# fix for: /usr/bin/ld: ./.libs/libosdc.a(libcommon_la-ceph_context.o): undefined reference to symbol 'sem_post@@GLIBC_2.4' +EXTRA_CFLAGS="-lpthread" +%endif +%ifarch armv5tel +# ARM architectures below v6 should define AO_USE_PTHREAD_DEFS (move to gc?) +EXTRA_CFLAGS="$EXTRA_CFLAGS -DAO_USE_PTHREAD_DEFS=1" +%endif + +make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS $EXTRA_CFLAGS" CXXFLAGS="$RPM_OPT_FLAGS $EXTRA_CFLAGS" %install rm -rf $RPM_BUILD_ROOT @@ -239,6 +249,9 @@ fi %{_bindir}/boto_tool %changelog +* Thu Mar 01 2012 Niels de Vos - 0.41-2.0.arm1 +- define AO_USE_PTHREAD_DEFS for armv5tel + * Tue Feb 28 2012 Fedora Release Engineering - 0.41-2 - Rebuilt for c++ ABI breakage -- 1.7.1