[Pkg-ceph-commits] [ceph] 14/59: Support build on i386.

James Downing Page jamespage at moszumanska.debian.org
Thu Feb 1 15:27:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

jamespage pushed a commit to branch ubuntu/artful
in repository ceph.

commit 768373d73f65b75b66ca78db324a5c59959a6d29
Author: James Page <james.page at ubuntu.com>
Date:   Tue Jun 6 11:09:55 2017 +0000

    Support build on i386.
    
      - d/p/i386-build-fixes.patch: Misc patches to ensure that only
        a minimal set of SIMD instructions are used to i386, inline
        with previous autotools configuration.
---
 debian/changelog                      |  4 ++++
 debian/control                        |  2 +-
 debian/patches/gf-complete-i386.patch | 28 ----------------------------
 debian/patches/i386-build-fixes.patch | 29 +++++++++++++++++++++++++++++
 debian/patches/series                 |  2 +-
 debian/rules                          |  2 +-
 6 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2c77fb7..c16dc5a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,10 @@ ceph (12.0.3-0ubuntu1) UNRELEASED; urgency=medium
     - d/rules: Disable RGW Beast frontend on s390x architecture.
     - d/control: Scope libboost-{context,coroutine}-dev to exclude
       s390x.
+  * Support build on i386:
+    - d/p/i386-build-fixes.patch: Misc patches to ensure that only
+      a minimal set of SIMD instructions are used to i386, inline
+      with previous autotools configuration.
 
  -- James Page <james.page at ubuntu.com>  Fri, 26 May 2017 09:42:42 +0000
 
diff --git a/debian/control b/debian/control
index dedad09..d29ae69 100644
--- a/debian/control
+++ b/debian/control
@@ -66,7 +66,7 @@ Build-Depends: cmake,
                valgrind [amd64 armhf i386 powerpc],
                xfslibs-dev,
                xfsprogs,
-               yasm [amd64 i386],
+               yasm [amd64],
                zlib1g-dev,
 Build-Conflicts: libcrypto++-dev,
 Standards-Version: 3.9.8
diff --git a/debian/patches/gf-complete-i386.patch b/debian/patches/gf-complete-i386.patch
deleted file mode 100644
index c9912d3..0000000
--- a/debian/patches/gf-complete-i386.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: Fix 32bit x86 builds
-Origin: https://github.com/quantcast/qfs/commit/546e3bd8430724a88737321baef7a29eb0d695bf
-
---- a/src/erasure-code/jerasure/gf-complete/include/gf_complete.h
-+++ b/src/erasure-code/jerasure/gf-complete/include/gf_complete.h
-@@ -31,6 +31,22 @@
- 
- #ifdef INTEL_SSE4_PCLMUL
-   #include <wmmintrin.h>
-+
-+#if ! defined(__x86_64__)
-+#if ! defined(_mm_insert_epi64)
-+static __inline __m128i _mm_insert_epi64(__m128i a, long long b, int c) {
-+  c <<= 1;
-+  a = _mm_insert_epi32(a, (unsigned int)b, c);
-+  return _mm_insert_epi32(a, (unsigned int)(b >> 32), c + 1);
-+}
-+#endif
-+#if ! defined(_mm_extract_epi64)
-+static __inline long long  _mm_extract_epi64 (__m128i __X, const int __N)
-+{
-+  return __builtin_ia32_vec_ext_v2di ((__v2di)__X, __N);
-+}
-+#endif
-+#endif
- #endif
- 
- #if defined(ARM_NEON)
diff --git a/debian/patches/i386-build-fixes.patch b/debian/patches/i386-build-fixes.patch
new file mode 100644
index 0000000..d90ad19
--- /dev/null
+++ b/debian/patches/i386-build-fixes.patch
@@ -0,0 +1,29 @@
+Description: Misc fixes for i386 builds
+ Scope misc SIMD flags to x86_64 only
+ Scope crypto/isa-l based on yasm/x86_64
+Author: James Page <james.page at ubuntu.com>
+
+--- a/cmake/modules/SIMDExt.cmake
++++ b/cmake/modules/SIMDExt.cmake
+@@ -91,6 +91,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i
+   if(HAVE_INTEL_SSSE3)
+     set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mssse3")
+   endif()
++elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+   CHECK_C_COMPILER_FLAG(-mpclmul HAVE_INTEL_PCLMUL)
+   if(HAVE_INTEL_PCLMUL)
+     set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mpclmul")
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -883,9 +883,9 @@ if(WITH_TESTS)
+     DESTINATION bin)
+ endif(WITH_TESTS)
+ 
+-if(HAVE_INTEL)
++if(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64)
+   add_subdirectory(crypto/isa-l)
+-endif(HAVE_INTEL)
++endif(HAVE_INTEL AND HAVE_BETTER_YASM_ELF64)
+ 
+ if(WITH_TESTS)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index ebd8010..e284a47 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,4 +4,4 @@ radosgw-boost-linking.patch
 conditional-rgw-beast.patch
 
 # Ubuntu: i386 build failure
-gf-complete-i386.patch
+i386-build-fixes.patch
diff --git a/debian/rules b/debian/rules
index 19b0255..927ac4f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -39,7 +39,7 @@ ifeq ($(DEB_HOST_ARCH), s390x)
 endif
 
 %:
-	dh $@ --buildsystem=cmake --with javahelper,python2,python3,systemd --parallel --max-parallel=4
+	dh $@ --buildsystem=cmake --with javahelper,python2,python3,systemd --parallel
 
 override_dh_auto_configure:
 	dh_auto_configure --buildsystem=cmake -- $(extraopts)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list