From 90b0c0b742d93c4e36b1af60e6d4bf126347a9b2 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sat, 2 Jul 2022 15:31:28 +0200 Subject: [PATCH] gperftools: remove libunwind when building statically Co-authored-by: Alyssa Ross --- pkgs/development/libraries/gperftools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gperftools/default.nix b/pkgs/development/libraries/gperftools/default.nix index 30af1d06fbbc..c4f7770ae8c3 100644 --- a/pkgs/development/libraries/gperftools/default.nix +++ b/pkgs/development/libraries/gperftools/default.nix @@ -28,8 +28,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; - # tcmalloc uses libunwind in a way that works correctly only on non-ARM linux - buildInputs = lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isAarch) libunwind; + # tcmalloc uses libunwind in a way that works correctly only on non-ARM dynamically linked linux + buildInputs = lib.optional (stdenv.isLinux && !(stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isStatic )) libunwind; # Disable general dynamic TLS on AArch to support dlopen()'ing the library: # https://bugzilla.redhat.com/show_bug.cgi?id=1483558