branto pushed to ceph (f22). "Fix arm compilation issues"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 16 11:11:28 UTC 2015


>From f5efd94d7bfcea7533c2768fc22bd70913d67d9b Mon Sep 17 00:00:00 2001
From: Boris Ranto <branto at redhat.com>
Date: Thu, 16 Apr 2015 13:09:24 +0200
Subject: Fix arm compilation issues


diff --git a/0001-Disable-erasure_codelib-neon-build.patch b/0001-Disable-erasure_codelib-neon-build.patch
new file mode 100644
index 0000000..8f73c4a
--- /dev/null
+++ b/0001-Disable-erasure_codelib-neon-build.patch
@@ -0,0 +1,29 @@
+From 8b0b78dc06ae1ed1c5f3c7a13271e7037091d0be Mon Sep 17 00:00:00 2001
+From: Boris Ranto <branto at redhat.com>
+Date: Wed, 15 Apr 2015 14:06:24 +0200
+Subject: [PATCH] Disable erasure_codelib neon build
+
+---
+ src/erasure-code/jerasure/Makefile.am | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/erasure-code/jerasure/Makefile.am b/src/erasure-code/jerasure/Makefile.am
+index 9ca4fbb..147d57e 100644
+--- a/src/erasure-code/jerasure/Makefile.am
++++ b/src/erasure-code/jerasure/Makefile.am
+@@ -75,9 +75,9 @@ if LINUX
+ libec_jerasure_neon_la_LDFLAGS += -export-symbols-regex '.*__erasure_code_.*'
+ endif
+ 
+-if HAVE_NEON
+-erasure_codelib_LTLIBRARIES += libec_jerasure_neon.la
+-endif
++#if HAVE_NEON
++#erasure_codelib_LTLIBRARIES += libec_jerasure_neon.la
++#endif
+ 
+ libec_jerasure_sse3_la_SOURCES = ${jerasure_sources}
+ libec_jerasure_sse3_la_CFLAGS = ${AM_CFLAGS}  \
+-- 
+2.1.0
+
diff --git a/0002-Add-support-for-PPC-arch.patch b/0002-Add-support-for-PPC-arch.patch
new file mode 100644
index 0000000..40e5817
--- /dev/null
+++ b/0002-Add-support-for-PPC-arch.patch
@@ -0,0 +1,33 @@
+From b2781fb5638afae7438b983a912ede126a8c5b85 Mon Sep 17 00:00:00 2001
+From: James Page <james.page at ubuntu.com>
+Date: Fri, 13 Mar 2015 19:46:04 +0000
+Subject: [PATCH] Add support for PPC architecture, provide fallback
+
+Add high precision cpu cycles support for powerpc and powerpc64.
+
+Provide a fallback for other architectures and warn during
+compilation.
+
+Signed-off-by: James Page <james.page at ubuntu.com>
+
+diff --git a/src/common/Cycles.h b/src/common/Cycles.h
+index 6e47cde..bb47d5c 100644
+--- a/src/common/Cycles.h
++++ b/src/common/Cycles.h
+@@ -72,8 +72,15 @@ class Cycles {
+     uint64_t cntvct;
+     asm volatile ("isb; mrs %0, cntvct_el0; isb; " : "=r" (cntvct) :: "memory");
+     return cntvct;
++#elif defined(__powerpc__) || defined (__powerpc64__)
++    // Based on:
++    // https://github.com/randombit/botan/blob/net.randombit.botan/src/lib/entropy/hres_timer/hres_timer.cpp
++    uint32_t lo = 0, hi = 0;
++    asm volatile("mftbu %0; mftb %1" : "=r" (hi), "=r" (lo));
++    return (((uint64_t)hi << 32) | lo);
+ #else
+-#error No high-precision counter available for your OS/arch
++#warning No high-precision counter available for your OS/arch
++    return 0;
+ #endif
+   }
+ 
diff --git a/ceph.spec b/ceph.spec
index eca6cd7..5c2b979 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -22,6 +22,8 @@ Source0:	http://ceph.com/download/%{name}-%{version}.tar.bz2
 %if 0%{?fedora} || 0%{?centos} || 0%{?rhel}
 Patch0:		init-ceph.in-fedora.patch
 %endif
+Patch1:		0001-Disable-erasure_codelib-neon-build.patch
+Patch2:		0002-Add-support-for-PPC-arch.patch
 Requires:	librbd1 = %{epoch}:%{version}-%{release}
 Requires:	librados2 = %{epoch}:%{version}-%{release}
 Requires:	libcephfs1 = %{epoch}:%{version}-%{release}
@@ -426,6 +428,8 @@ python-cephfs instead.
 %if 0%{?fedora} || 0%{?rhel} || 0%{?centos}
 %patch0 -p1 -b .init
 %endif
+%patch1 -p1
+%patch2 -p1
 
 %build
 # Find jni.h
@@ -477,10 +481,6 @@ make %{_smp_mflags}
 make DESTDIR=$RPM_BUILD_ROOT install
 find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
 find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
-%if ! (0%{?fedora} == 20 || 0%{?rhel} == 6)
-# do not package man page for binary that is not built
-rm -f $RPM_BUILD_ROOT%{_mandir}/man8/rbd-replay-prep.8*
-%endif
 install -D src/init-ceph $RPM_BUILD_ROOT%{_initrddir}/ceph
 install -D src/init-radosgw.sysv $RPM_BUILD_ROOT%{_initrddir}/ceph-radosgw
 install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap
@@ -893,10 +893,9 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %{_mandir}/man8/rbd-replay-many.8*
 %{_bindir}/rbd-replay
 %{_bindir}/rbd-replay-many
-%if (0%{?fedora} == 20 || 0%{?rhel} == 6)
 %{_mandir}/man8/rbd-replay-prep.8*
 %{_bindir}/rbd-replay-prep
-%endif
+%{_bindir}/ceph_perf_objectstore
 
 #################################################################################
 %files -n libcephfs_jni1
@@ -912,7 +911,6 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %files -n cephfs-java
 %defattr(-,root,root,-)
 %{_javadir}/libcephfs.jar
-%{_javadir}/libcephfs-test.jar
 
 #################################################################################
 %files libs-compat
@@ -932,6 +930,7 @@ ln -sf %{_libdir}/librbd.so.1 /usr/lib64/qemu/librbd.so.1
 %changelog
 * Tue Apr 14 2015 Boris Ranto <branto at redhat.com> - 1:0.94.1-1
 - Rebase to latest upstream version and sync-up the spec file
+- Add arm compilation patches
 
 * Wed Apr 01 2015 Ken Dreyer <ktdreyer at ktdreyer.com> - 1:0.87.1-3
 - add version numbers to Obsoletes (RHBZ #1193182)
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/ceph.git/commit/?h=f22&id=f5efd94d7bfcea7533c2768fc22bd70913d67d9b


More information about the scm-commits mailing list