From 43a0545a2c203993f584bffe55984d9d18a180be Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 28 Apr 2019 14:34:34 +0200 Subject: [PATCH] - added x32 patch (fix invalid operand size of bsrq instruction); release 2 --- jemalloc-x32.patch | 18 ++++++++++++++++++ jemalloc.spec | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 jemalloc-x32.patch diff --git a/jemalloc-x32.patch b/jemalloc-x32.patch new file mode 100644 index 0000000..82c460d --- /dev/null +++ b/jemalloc-x32.patch @@ -0,0 +1,18 @@ +--- jemalloc-5.2.0/include/jemalloc/internal/bit_util.h.orig 2019-04-28 14:32:25.888211875 +0200 ++++ jemalloc-5.2.0/include/jemalloc/internal/bit_util.h 2019-04-28 14:32:29.508401674 +0200 +@@ -86,13 +86,14 @@ + if(unlikely(x <= 1)) { + return x; + } +- size_t msb_on_index; + #if (defined(__amd64__) || defined(__x86_64__)) ++ uint64_t msb_on_index; + asm ("bsrq %1, %0" + : "=r"(msb_on_index) // Outputs. + : "r"(x-1) // Inputs. + ); + #elif (defined(JEMALLOC_HAVE_BUILTIN_CLZ)) ++ size_t msb_on_index; + msb_on_index = (63 ^ __builtin_clzll(x - 1)); + #endif + assert(msb_on_index < 63); diff --git a/jemalloc.spec b/jemalloc.spec index 655b4b6..5ce5917 100644 --- a/jemalloc.spec +++ b/jemalloc.spec @@ -2,12 +2,13 @@ Summary: General-purpose scalable concurrent malloc implementation Summary(pl.UTF-8): Ogólnego przeznaczenia, skalowalna, współbieżna implementacja funkcji malloc Name: jemalloc Version: 5.2.0 -Release: 1 +Release: 2 License: BSD Group: Libraries #Source0Download: https://github.com/jemalloc/jemalloc/releases Source0: https://github.com/jemalloc/jemalloc/releases/download/%{version}/%{name}-%{version}.tar.bz2 # Source0-md5: 0af300de702a1443e6560c1eae254df7 +Patch0: %{name}-x32.patch URL: http://jemalloc.net/ BuildRequires: libxslt-progs BuildRequires: sed >= 4.0 @@ -57,6 +58,7 @@ Statyczna biblioteka jemalloc. %prep %setup -q +%patch0 -p1 # This is truncated during build. Seems interesting to save. cp -p VERSION version -- 2.44.0