summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2018-04-12 17:55:07 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-05-07 15:57:43 +0100
commit4b15cf9c62148817af924baa7e9ee611b0385353 (patch)
tree595502ab32293c0c4a48c00eeee651af54985326
parent7c8d80214eba049166ac8c904471815898b1879d (diff)
downloadpoky-4b15cf9c62148817af924baa7e9ee611b0385353.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) (From OE-Core rev: 77ddd969569c91b705db2307af450b4e0574ee87) 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: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch68
-rw-r--r--meta/recipes-core/glibc/glibc_2.25.bb1
2 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
new file mode 100644
index 0000000000..bef888742b
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
@@ -0,0 +1,68 @@
1From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001
2From: Pratyush Anand <panand@redhat.com>
3Date: Wed, 22 Mar 2017 17:02:38 +0530
4Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Compile following linux kernel test code with latest glibc:
10
11https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
12
13and we get following error:
14breakpoint_test_arm64.c: In function ‘run_test’:
15breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function)
16 if (siginfo.si_code != TRAP_HWBKPT) {
17 ^
18I can compile test code by modifying my local
19/usr/include/bits/siginfo.h and test works great. Therefore, this patch
20will be needed in upstream glibc so that issue is fixed there as well.
21
22Signed-off-by: Pratyush Anand <panand@redhat.com>
23
24Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=21286]
25---
26 bits/siginfo.h | 6 +++++-
27 sysdeps/unix/sysv/linux/bits/siginfo.h | 6 +++++-
28 2 files changed, 10 insertions(+), 2 deletions(-)
29
30diff --git a/bits/siginfo.h b/bits/siginfo.h
31index 4919df5..6dc714e 100644
32--- a/bits/siginfo.h
33+++ b/bits/siginfo.h
34@@ -140,8 +140,12 @@ enum
35 {
36 TRAP_BRKPT = 1, /* Process breakpoint. */
37 # define TRAP_BRKPT TRAP_BRKPT
38- TRAP_TRACE /* Process trace trap. */
39+ TRAP_TRACE, /* Process trace trap. */
40 # define TRAP_TRACE TRAP_TRACE
41+ TRAP_BRANCH, /* Process branch trap. */
42+# define TRAP_BRANCH TRAP_BRANCH
43+ TRAP_HWBKPT /* hardware breakpoint/watchpoint */
44+# define TRAP_HWBKPT TRAP_HWBKPT
45 };
46 # endif
47
48diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
49index 7b0d4f6..9cdf42a 100644
50--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
51+++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
52@@ -235,8 +235,12 @@ enum
53 {
54 TRAP_BRKPT = 1, /* Process breakpoint. */
55 # define TRAP_BRKPT TRAP_BRKPT
56- TRAP_TRACE /* Process trace trap. */
57+ TRAP_TRACE, /* Process trace trap. */
58 # define TRAP_TRACE TRAP_TRACE
59+ TRAP_BRANCH, /* Process branch trap. */
60+# define TRAP_BRANCH TRAP_BRANCH
61+ TRAP_HWBKPT /* hardware breakpoint/watchpoint */
62+# define TRAP_HWBKPT TRAP_HWBKPT
63 };
64 # endif
65
66--
672.7.4
68
diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb
index 58b90b7b90..49fcf0c67e 100644
--- a/meta/recipes-core/glibc/glibc_2.25.bb
+++ b/meta/recipes-core/glibc/glibc_2.25.bb
@@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
43 file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ 43 file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
44 file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \ 44 file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \
45 file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \ 45 file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \
46 file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \
46" 47"
47 48
48NATIVESDKFIXES ?= "" 49NATIVESDKFIXES ?= ""