about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libunwind
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libunwind')
-rw-r--r--nixpkgs/pkgs/development/libraries/libunwind/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libunwind/default.nix b/nixpkgs/pkgs/development/libraries/libunwind/default.nix
index bda7f72a5576..643752da1dc5 100644
--- a/nixpkgs/pkgs/development/libraries/libunwind/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libunwind/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, autoreconfHook, xz, coreutils }:
+{ stdenv, lib, fetchurl, fetchpatch, autoreconfHook, xz, coreutils }:
 
 stdenv.mkDerivation rec {
   pname = "libunwind";
@@ -9,7 +9,15 @@ stdenv.mkDerivation rec {
     sha256 = "0dc46flppifrv2z0mrdqi60165ghxm1wk0g47vcbyzjdplqwjnfz";
   };
 
-  patches = [ ./backtrace-only-with-glibc.patch ];
+  patches = [
+    ./backtrace-only-with-glibc.patch
+
+    (fetchpatch {
+      # upstream build fix against -fno-common compilers like >=gcc-10
+      url = "https://github.com/libunwind/libunwind/commit/29e17d8d2ccbca07c423e3089a6d5ae8a1c9cb6e.patch";
+      sha256 = "1angwfq6h0jskg6zx8g6w9min38g5mgmrcbppcy5hqn59cgsxbw0";
+    })
+  ];
 
   postPatch = lib.optionalString stdenv.hostPlatform.isMusl ''
     substituteInPlace configure.ac --replace "-lgcc_s" "-lgcc_eh"