summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2018-03-02 22:21:30 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-06 06:43:11 -0800
commit23afd66b0122b450a3a8ae4cfa811214bff9f576 (patch)
tree503fded5298a95026aaabf296c6f110b03d7bd9b /meta/recipes-core
parent071489bb39c16311e78addffd56e222b1945c9a4 (diff)
downloadpoky-23afd66b0122b450a3a8ae4cfa811214bff9f576.tar.gz
glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions
Patch submitted upstream, pending to be merged: https://sourceware.org/bugzilla/show_bug.cgi?id=21286 (From OE-Core rev: 11ebb5054e5ec1171ade90249e3a30ac8174a35a) Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch69
-rw-r--r--meta/recipes-core/glibc/glibc_2.27.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch b/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
new file mode 100644
index 0000000000..436c84778e
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
@@ -0,0 +1,69 @@
1From af3054b3856379d353a779801678f330e1b58c9a Mon Sep 17 00:00:00 2001
2Message-Id: <af3054b3856379d353a779801678f330e1b58c9a.1490183611.git.panand@redhat.com>
3From: Pratyush Anand <panand@redhat.com>
4Date: Wed, 22 Mar 2017 17:02:38 +0530
5Subject: [PATCH] bits/siginfo-consts.h: enum definition for TRAP_HWBKPT is missing
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Compile following linux kernel test code with latest glibc:
11
12https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
13
14and we get following error:
15breakpoint_test_arm64.c: In function ‘run_test’:
16breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function)
17 if (siginfo.si_code != TRAP_HWBKPT) {
18 ^
19I can compile test code by modifying my local
20/usr/include/bits/siginfo.h and test works great. Therefore, this patch
21will be needed in upstream glibc so that issue is fixed there as well.
22
23Signed-off-by: Pratyush Anand <panand@redhat.com>
24
25Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=21286]
26---
27 bits/siginfo-consts.h | 6 +++++-
28 sysdeps/unix/sysv/linux/bits/siginfo-consts.h | 6 +++++-
29 2 files changed, 10 insertions(+), 2 deletions(-)
30
31diff --git a/bits/siginfo-consts.h b/bits/siginfo-consts.h
32index a58ac4b..8448fac 100644
33--- a/bits/siginfo-consts.h
34+++ b/bits/siginfo-consts.h
35@@ -106,8 +106,12 @@ enum
36 {
37 TRAP_BRKPT = 1, /* Process breakpoint. */
38 # define TRAP_BRKPT TRAP_BRKPT
39- TRAP_TRACE /* Process trace trap. */
40+ TRAP_TRACE, /* Process trace trap. */
41 # define TRAP_TRACE TRAP_TRACE
42+ TRAP_BRANCH, /* Process branch trap. */
43+# define TRAP_BRANCH TRAP_BRANCH
44+ TRAP_HWBKPT /* hardware breakpoint/watchpoint */
45+# define TRAP_HWBKPT TRAP_HWBKPT
46 };
47 # endif
48
49diff --git a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
50index 525840c..57a9edb 100644
51--- a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
52+++ b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
53@@ -137,8 +137,12 @@ enum
54 {
55 TRAP_BRKPT = 1, /* Process breakpoint. */
56 # define TRAP_BRKPT TRAP_BRKPT
57- TRAP_TRACE /* Process trace trap. */
58+ TRAP_TRACE, /* Process trace trap. */
59 # define TRAP_TRACE TRAP_TRACE
60+ TRAP_BRANCH, /* Process branch trap. */
61+# define TRAP_BRANCH TRAP_BRANCH
62+ TRAP_HWBKPT /* hardware breakpoint/watchpoint */
63+# define TRAP_HWBKPT TRAP_HWBKPT
64 };
65 # endif
66
67--
682.7.4
69
diff --git a/meta/recipes-core/glibc/glibc_2.27.bb b/meta/recipes-core/glibc/glibc_2.27.bb
index bcc1acfbc2..c4042d16fe 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.bb
@@ -42,6 +42,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
42 file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \ 42 file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
43 file://0026-reset-dl_load_write_lock-after-forking.patch \ 43 file://0026-reset-dl_load_write_lock-after-forking.patch \
44 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \ 44 file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
45 file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
45" 46"
46 47
47NATIVESDKFIXES ?= "" 48NATIVESDKFIXES ?= ""