summaryrefslogtreecommitdiffstats
path: root/pkgs/development/libraries/boost
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2020-10-14 19:03:51 -0700
committerRyan Burns <rtburns@protonmail.com>2020-10-22 01:11:21 -0700
commitca89e801ead2158f991e530031755a2a69372eec (patch)
tree7951b3dbac859e1d56ae31cbd4b7d0d392f91136 /pkgs/development/libraries/boost
parentbb0b872b61125b7b1785df72bf91d8f863aa39de (diff)
boost: fix segfaults on ppc64
Fixes https://github.com/NixOS/nix/issues/2517 See also: https://github.com/boostorg/context/issues/72 https://github.com/boostorg/fiber/issues/193 These issues have been resolved by: https://github.com/boostorg/context/pull/106 https://github.com/boostorg/context/commit/d4608a4e8ba2e8a0bdd45613243e6c53a23d23dc which is merged into boost as of v1.71.0. This feature was introduced (with the bug) in boost v1.61 and was fixed in v1.71. So we apply the patch to all versions in that range.
Diffstat (limited to 'pkgs/development/libraries/boost')
-rw-r--r--pkgs/development/libraries/boost/generic.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix
index a195a2c7bb98..b3950cb0d301 100644
--- a/pkgs/development/libraries/boost/generic.nix
+++ b/pkgs/development/libraries/boost/generic.nix
@@ -1,4 +1,5 @@
{ stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv
+, fetchpatch
, which
, buildPackages
, toolset ? /**/ if stdenv.cc.isClang then "clang"
@@ -113,6 +114,14 @@ stdenv.mkDerivation {
if version == "1.55.0"
then ./darwin-1.55-no-system-python.patch
else ./darwin-no-system-python.patch)
+ # Fix boost-context segmentation faults on ppc64 due to ABI violation
+ ++ optional (versionAtLeast version "1.61" &&
+ versionOlder version "1.71") (fetchpatch {
+ url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
+ sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
+ stripLen = 1;
+ extraPrefix = "libs/context/";
+ })
++ optional (and (versionAtLeast version "1.70") (!versionAtLeast version "1.73")) ./cmake-paths.patch
++ optional (versionAtLeast version "1.73") ./cmake-paths-173.patch;