summaryrefslogtreecommitdiffstats
path: root/a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch
diff options
context:
space:
mode:
Diffstat (limited to 'a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch')
-rw-r--r--a85c798f91bfef796116f3ebf5e5e7e479c8683f.patch36
1 files changed, 36 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);
+ }
+ "
+