diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-11-18 23:23:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-12 23:42:55 +0000 |
commit | 41fd73fe6591ee4d4e905d228db19d29f7c04637 (patch) | |
tree | c712595c63a4e228c5dc78b4ad6544d25a60ce24 /meta/recipes-devtools/gdb | |
parent | 1ee97d844f41fcc4abdbca4fe61ba494d41b333c (diff) | |
download | poky-41fd73fe6591ee4d4e905d228db19d29f7c04637.tar.gz |
gdb: Fix build with musl
This is a patch that has been submitted upstream as well
(From OE-Core rev: 87376746d64aea47cce327d951692c31d4acf872)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gdb')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch | 54 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb.inc b/meta/recipes-devtools/gdb/gdb.inc index 88c0213b44..2162cadb9e 100644 --- a/meta/recipes-devtools/gdb/gdb.inc +++ b/meta/recipes-devtools/gdb/gdb.inc | |||
@@ -5,6 +5,7 @@ inherit gettext | |||
5 | SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \ | 5 | SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \ |
6 | file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \ | 6 | file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \ |
7 | file://fix-detection-of-64-bit-PPC-inferior-in-gdbserver.patch \ | 7 | file://fix-detection-of-64-bit-PPC-inferior-in-gdbserver.patch \ |
8 | file://0001-Use-exported-definitions-of-SIGRTMIN.patch \ | ||
8 | " | 9 | " |
9 | #LDFLAGS_append = " -s" | 10 | #LDFLAGS_append = " -s" |
10 | #export CFLAGS_append=" -L${STAGING_LIBDIR}" | 11 | #export CFLAGS_append=" -L${STAGING_LIBDIR}" |
diff --git a/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch b/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch new file mode 100644 index 0000000000..5f0c096939 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 2f97e89e9e4e5797d0d973e1d05c1f44c46b4912 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 5 Jun 2015 20:21:38 -0700 | ||
4 | Subject: [PATCH] Use exorted definitions of SIGRTMIN | ||
5 | |||
6 | Define W_STOPCODE if not defined already | ||
7 | |||
8 | __SIGRTMIN is internal to glibc and other libcs e.g. musl | ||
9 | may not provide them | ||
10 | |||
11 | Fixes | ||
12 | https://sourceware.org/bugzilla/show_bug.cgi?id=13012 | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | Upstream-Status: Submitted | ||
17 | |||
18 | gdb/linux-nat.c | 4 ++-- | ||
19 | gdb/nat/linux-nat.h | 4 ++++ | ||
20 | 2 files changed, 6 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c | ||
23 | index 396c30c..50320ee 100644 | ||
24 | --- a/gdb/linux-nat.c | ||
25 | +++ b/gdb/linux-nat.c | ||
26 | @@ -4856,10 +4856,10 @@ lin_thread_get_thread_signals (sigset_t *set) | ||
27 | fortunately they don't change! */ | ||
28 | |||
29 | if (restart == 0) | ||
30 | - restart = __SIGRTMIN; | ||
31 | + restart = SIGRTMIN; | ||
32 | |||
33 | if (cancel == 0) | ||
34 | - cancel = __SIGRTMIN + 1; | ||
35 | + cancel = SIGRTMIN + 1; | ||
36 | |||
37 | sigaddset (set, restart); | ||
38 | sigaddset (set, cancel); | ||
39 | diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h | ||
40 | index 83a6d91..efbe0fd 100644 | ||
41 | --- a/gdb/nat/linux-nat.h | ||
42 | +++ b/gdb/nat/linux-nat.h | ||
43 | @@ -25,4 +25,8 @@ | ||
44 | instead SIGTRAP with bit 7 set. */ | ||
45 | #define SYSCALL_SIGTRAP (SIGTRAP | 0x80) | ||
46 | |||
47 | +#ifndef W_STOPCODE | ||
48 | +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) | ||
49 | +#endif | ||
50 | + | ||
51 | #endif /* LINUX_NAT_H */ | ||
52 | -- | ||
53 | 2.1.4 | ||
54 | |||