about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libunwind
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-01-03 23:55:00 +0000
committerAlyssa Ross <hi@alyssa.is>2022-02-19 11:03:39 +0000
commitf4cf97a04cd5d0b86aa46baec9fb228a8f671c03 (patch)
tree28192415ff39a661d0001563bf81cc93fa25d16d /nixpkgs/pkgs/development/libraries/libunwind
parentf8422837c9bde058e8f2de37702e7e94b2226040 (diff)
parent18c84ea816348e2a098390101b92d1e39a9dbd45 (diff)
downloadnixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.gz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.bz2
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.lz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.xz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.zst
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.zip
Merge commit '18c84ea816348e2a098390101b92d1e39a9dbd45'
Conflicts:
	nixpkgs/nixos/modules/misc/documentation.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/patchsets.nix
	nixpkgs/pkgs/development/libraries/boehm-gc/7.6.6.nix
	nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
	nixpkgs/pkgs/servers/mail/mailman/web.nix
	nixpkgs/pkgs/top-level/aliases.nix
	nixpkgs/pkgs/top-level/all-packages.nix
	nixpkgs/pkgs/top-level/impure.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libunwind')
-rw-r--r--nixpkgs/pkgs/development/libraries/libunwind/backtrace-only-with-glibc.patch45
-rw-r--r--nixpkgs/pkgs/development/libraries/libunwind/default.nix24
2 files changed, 8 insertions, 61 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libunwind/backtrace-only-with-glibc.patch b/nixpkgs/pkgs/development/libraries/libunwind/backtrace-only-with-glibc.patch
deleted file mode 100644
index 5fcaa72c0c01..000000000000
--- a/nixpkgs/pkgs/development/libraries/libunwind/backtrace-only-with-glibc.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem at gmail.com>
-Date: Thu, 31 Dec 2015 06:44:07 +0000
-Subject: [PATCH] backtrace: Use only with glibc and uclibc
-
-backtrace API is glibc specific not linux specific
-so make it behave so.
-
-Signed-off-by: Khem Raj <raj.khem at gmail.com>
----
-Upstream-Status: Pending
-
- tests/test-coredump-unwind.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
-index 5254708..8767b42 100644
---- a/tests/test-coredump-unwind.c
-+++ b/tests/test-coredump-unwind.c
-@@ -57,7 +57,9 @@
- #include <grp.h>
- 
- /* For SIGSEGV handler code */
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <sys/ucontext.h>
- 
- #include <libunwind-coredump.h>
-@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
- 			ip);
- 
-   {
-+#ifdef __GLIBC__
-     /* glibc extension */
-     void *array[50];
-     int size;
-     size = backtrace(array, 50);
--#ifdef __linux__
-     backtrace_symbols_fd(array, size, 2);
- #endif
-   }
--- 
-2.6.4
-
diff --git a/nixpkgs/pkgs/development/libraries/libunwind/default.nix b/nixpkgs/pkgs/development/libraries/libunwind/default.nix
index 643752da1dc5..4bce1341c7d8 100644
--- a/nixpkgs/pkgs/development/libraries/libunwind/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libunwind/default.nix
@@ -1,25 +1,17 @@
-{ stdenv, lib, fetchurl, fetchpatch, autoreconfHook, xz, coreutils }:
+{ stdenv, lib, fetchurl, autoreconfHook, xz, buildPackages }:
 
 stdenv.mkDerivation rec {
   pname = "libunwind";
-  version = "1.4.0";
+  version = "1.6.2";
 
   src = fetchurl {
     url = "mirror://savannah/libunwind/${pname}-${version}.tar.gz";
-    sha256 = "0dc46flppifrv2z0mrdqi60165ghxm1wk0g47vcbyzjdplqwjnfz";
+    sha256 = "sha256-SmrsZmmR+0XQiJxErt6K1usQgHHDVU/N/2cfnJR5SXY=";
   };
 
-  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 ''
+  postPatch = if stdenv.cc.isClang then ''
+    substituteInPlace configure.ac --replace "-lgcc_s" ""
+  '' else lib.optionalString stdenv.hostPlatform.isMusl ''
     substituteInPlace configure.ac --replace "-lgcc_s" "-lgcc_eh"
   '';
 
@@ -29,7 +21,7 @@ stdenv.mkDerivation rec {
 
   # Without latex2man, no man pages are installed despite being
   # prebuilt in the source tarball.
-  configureFlags = [ "LATEX2MAN=${coreutils}/bin/true" ];
+  configureFlags = [ "LATEX2MAN=${buildPackages.coreutils}/bin/true" ];
 
   propagatedBuildInputs = [ xz ];
 
@@ -46,7 +38,7 @@ stdenv.mkDerivation rec {
     description = "A portable and efficient API to determine the call-chain of a program";
     maintainers = with maintainers; [ orivej ];
     platforms = platforms.linux;
-    badPlatforms = [ "riscv32-linux" "riscv64-linux" ];
+    badPlatforms = [ "riscv32-linux" ];
     license = licenses.mit;
   };
 }