3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #171859 from mweinelt/jemalloc

This commit is contained in:
Martin Weinelt 2022-06-12 00:54:20 +02:00 committed by GitHub
commit 37b7e36ed1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 16 deletions

View file

@ -1,7 +1,6 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
# By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
# then stops downstream builds (mariadb in particular) from detecting it. This
# option should remove the prefix and give us a working jemalloc.
@ -13,21 +12,13 @@
stdenv.mkDerivation rec {
pname = "jemalloc";
version = "5.2.1";
version = "5.3.0";
src = fetchurl {
url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${pname}-${version}.tar.bz2";
sha256 = "1xl7z0vwbn5iycg7amka9jd6hxd8nmfk7nahi4p9w2bnw9f0wcrl";
sha256 = "sha256-LbgtHnEZ3z5xt2QCGbbf6EeJvAU3mDw7esT3GJrs/qo=";
};
patches = [
# workaround https://github.com/jemalloc/jemalloc/issues/2091
(fetchpatch {
url = "https://github.com/jemalloc/jemalloc/commit/3b4a03b92b2e415415a08f0150fdb9eeb659cd52.diff";
sha256 = "sha256-6AYtADREhfj93ZLk9xnXtjc6vHDU0EKLLOvLd6YdJeI=";
})
];
# see the comment on stripPrefix
configureFlags = []
++ lib.optional stripPrefix "--with-jemalloc-prefix="
@ -41,6 +32,8 @@ stdenv.mkDerivation rec {
]
;
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-error=array-bounds";
doCheck = true;
enableParallelBuilding = true;

View file

@ -12,7 +12,6 @@
, curl
, flex
, gnutls
, jemalloc
, libconfig
, libdaemon
, libev
@ -99,7 +98,6 @@ stdenv.mkDerivation rec {
${lib.concatMapStringsSep "\n"
(x: ''replace_dep "${x.f}" "${x.p.src}" "${x.p.pname or (builtins.parseDrvName x.p.name).name}" "${x.p.name}"'') [
{ f = "curl"; p = curl; }
{ f = "jemalloc"; p = jemalloc; }
{ f = "libconfig"; p = libconfig; }
{ f = "libdaemon"; p = libdaemon; }
{ f = "libev"; p = libev; }

View file

@ -112,7 +112,7 @@
cd lz4/lz4 && CC=${CC} CXX=${CXX} ${MAKE}
lz4: lz4/lz4/liblz4.a
@@ -148,16 +112,12 @@ clickhouse-cpp: clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib.a
@@ -148,16 +112,14 @@ clickhouse-cpp: clickhouse-cpp/clickhouse-cpp/clickhouse/libclickhouse-cpp-lib.a
libdaemon/libdaemon/libdaemon/.libs/libdaemon.a:
@ -124,8 +124,8 @@
libdaemon: libdaemon/libdaemon/libdaemon/.libs/libdaemon.a
jemalloc/jemalloc/lib/libjemalloc.a:
- cd jemalloc && rm -rf jemalloc-5.2.0
- cd jemalloc && tar -jxf jemalloc-5.2.0.tar.bz2
cd jemalloc && rm -rf jemalloc-5.2.0
cd jemalloc && tar -jxf jemalloc-5.2.0.tar.bz2
cd jemalloc/jemalloc && patch src/jemalloc.c < ../issue823.520.patch
cd jemalloc/jemalloc && patch src/jemalloc.c < ../issue2358.patch
cd jemalloc/jemalloc && ./configure ${MYJEOPT}