Merge pull request #51376 from Izorkin/jemalloc
jemalloc: add option disable-initial-exec-tls
This commit is contained in:
commit
4112aec98c
|
@ -1,11 +1,15 @@
|
||||||
{ version, sha256 }:
|
{ version, sha256 }:
|
||||||
{ stdenv, fetchurl,
|
{ stdenv, fetchurl
|
||||||
# By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
|
# 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
|
# then stops downstream builds (mariadb in particular) from detecting it. This
|
||||||
# option should remove the prefix and give us a working jemalloc.
|
# option should remove the prefix and give us a working jemalloc.
|
||||||
# Causes segfaults with some software (ex. rustc), but defaults to true for backward
|
# Causes segfaults with some software (ex. rustc), but defaults to true for backward
|
||||||
# compatibility. Ignored on non OSX.
|
# compatibility. Ignored on non OSX.
|
||||||
stripPrefix ? true }:
|
, stripPrefix ? true
|
||||||
|
, disableInitExecTls ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "jemalloc-${version}";
|
name = "jemalloc-${version}";
|
||||||
|
@ -17,7 +21,11 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
# see the comment on stripPrefix
|
# see the comment on stripPrefix
|
||||||
configureFlags = stdenv.lib.optional (stdenv.isDarwin && stripPrefix) "--with-jemalloc-prefix=";
|
configureFlags = []
|
||||||
|
++ optional (stdenv.isDarwin && stripPrefix) [ "--with-jemalloc-prefix=" ]
|
||||||
|
++ optional disableInitExecTls [ "--disable-initial-exec-tls" ]
|
||||||
|
;
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
|
@ -13602,6 +13602,7 @@ with pkgs;
|
||||||
|
|
||||||
mariadb = callPackage ../servers/sql/mariadb {
|
mariadb = callPackage ../servers/sql/mariadb {
|
||||||
asio = asio_1_10;
|
asio = asio_1_10;
|
||||||
|
jemalloc = jemalloc.override ({ disableInitExecTls = true; });
|
||||||
inherit (darwin) cctools;
|
inherit (darwin) cctools;
|
||||||
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
|
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue