tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
libunwind: patch to fix build on non-glibc
Will Dietz
8 years ago
bc2ad5a9
41026550
+46
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
libunwind
backtrace-only-with-glibc.patch
default.nix
+45
pkgs/development/libraries/libunwind/backtrace-only-with-glibc.patch
···
1
1
+
From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001
2
2
+
From: Khem Raj <raj.khem at gmail.com>
3
3
+
Date: Thu, 31 Dec 2015 06:44:07 +0000
4
4
+
Subject: [PATCH] backtrace: Use only with glibc and uclibc
5
5
+
6
6
+
backtrace API is glibc specific not linux specific
7
7
+
so make it behave so.
8
8
+
9
9
+
Signed-off-by: Khem Raj <raj.khem at gmail.com>
10
10
+
---
11
11
+
Upstream-Status: Pending
12
12
+
13
13
+
tests/test-coredump-unwind.c | 4 +++-
14
14
+
1 file changed, 3 insertions(+), 1 deletion(-)
15
15
+
16
16
+
diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
17
17
+
index 5254708..8767b42 100644
18
18
+
--- a/tests/test-coredump-unwind.c
19
19
+
+++ b/tests/test-coredump-unwind.c
20
20
+
@@ -57,7 +57,9 @@
21
21
+
#include <grp.h>
22
22
+
23
23
+
/* For SIGSEGV handler code */
24
24
+
+#ifdef __GLIBC__
25
25
+
#include <execinfo.h>
26
26
+
+#endif
27
27
+
#include <sys/ucontext.h>
28
28
+
29
29
+
#include <libunwind-coredump.h>
30
30
+
@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
31
31
+
ip);
32
32
+
33
33
+
{
34
34
+
+#ifdef __GLIBC__
35
35
+
/* glibc extension */
36
36
+
void *array[50];
37
37
+
int size;
38
38
+
size = backtrace(array, 50);
39
39
+
-#ifdef __linux__
40
40
+
backtrace_symbols_fd(array, size, 2);
41
41
+
#endif
42
42
+
}
43
43
+
--
44
44
+
2.6.4
45
45
+
+1
pkgs/development/libraries/libunwind/default.nix
···
11
11
12
12
patches = [
13
13
./version-1.2.1.patch
14
14
+
./backtrace-only-with-glibc.patch
14
15
];
15
16
16
17
nativeBuildInputs = [ autoreconfHook ];