summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-06-29 11:18:40 +0200
committerRemi Collet <remi@remirepo.net>2017-06-29 11:18:40 +0200
commitab5faa7482e393fe556c8701e0f73623235177fe (patch)
treed1fe82d1350c633abb112d66dce39381ceaccef2
parentef73ae4fbe32eaf160956fb27c4dced47a2a96ad (diff)
upstream patch for 32-bit
-rw-r--r--a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch36
-rw-r--r--librdkafka.spec5
2 files changed, 41 insertions, 0 deletions
diff --git a/a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch b/a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch
new file mode 100644
index 0000000..4956dba
--- /dev/null
+++ b/a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch
@@ -0,0 +1,36 @@
+From a85c798f91bfef796116f3ebf5e5e7e479c8683f Mon Sep 17 00:00:00 2001
+From: Magnus Edenhill <magnus@edenhill.se>
+Date: Thu, 29 Jun 2017 10:35:23 +0200
+Subject: [PATCH] configure crc32 for x32: try to avoid dead-code removal
+
+---
+ configure.librdkafka | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/configure.librdkafka b/configure.librdkafka
+index 903b0276..923dd48f 100644
+--- a/configure.librdkafka
++++ b/configure.librdkafka
+@@ -86,11 +86,13 @@ function checks {
+ mkl_compile_check crc32chw WITH_CRC32C_HW disable CC "" \
+ "
+ #include <inttypes.h>
++#include <stdio.h>
+ #define LONGx1 \"8192\"
+ #define LONGx2 \"16384\"
+ void foo (void) {
+ const char *n = \"abcdefghijklmnopqrstuvwxyz0123456789\";
+ uint64_t c0 = 0, c1 = 1, c2 = 2;
++ uint64_t s;
+ uint32_t eax = 1, ecx;
+ __asm__(\"cpuid\"
+ : \"=c\"(ecx)
+@@ -104,6 +106,8 @@ void foo (void) {
+ \"crc32q\t\" LONGx2 \"(%3), %2\"
+ : \"=r\"(c0), \"=r\"(c1), \"=r\"(c2)
+ : \"r\"(n), \"0\"(c0), \"1\"(c1), \"2\"(c2));
++ s = c0 + c1 + c2;
++ printf(\"avoiding unused code removal by printing %d, %d, %d\n\", (int)s, (int)eax, (int)ecx);
+ }
+ "
+
diff --git a/librdkafka.spec b/librdkafka.spec
index fa66936..687efd6 100644
--- a/librdkafka.spec
+++ b/librdkafka.spec
@@ -26,6 +26,8 @@ License: BSD and MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz
+Patch0: a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch
+
BuildRequires: openssl-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: zlib-devel
@@ -56,6 +58,8 @@ developing applications that use %{name}.
%prep
%setup -qn %{gh_project}-%{gh_commit}
+# no backup to avoid old version inclusion
+%patch0 -p1
mkdir rpmdocs
cp -pr examples rpmdocs/examples
@@ -101,6 +105,7 @@ rm %{buildroot}%{_libdir}/*.a
- update to 0.11.0-RC1
- open https://github.com/edenhill/librdkafka/issues/1290
broken build on 32-bit architecture
+- add upstream for i686 build
* Fri Apr 21 2017 Remi Collet <remi@remirepo.net> - 0.9.5-1
- update to 0.9.5 (no change since RC2)