diff options
| author | Fathi Boudra <fathi.boudra@linaro.org> | 2018-04-12 17:55:07 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-07 15:57:43 +0100 |
| commit | 4b15cf9c62148817af924baa7e9ee611b0385353 (patch) | |
| tree | 595502ab32293c0c4a48c00eeee651af54985326 | |
| parent | 7c8d80214eba049166ac8c904471815898b1879d (diff) | |
| download | poky-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.patch | 68 | ||||
| -rw-r--r-- | meta/recipes-core/glibc/glibc_2.25.bb | 1 |
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 @@ | |||
| 1 | From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Pratyush Anand <panand@redhat.com> | ||
| 3 | Date: Wed, 22 Mar 2017 17:02:38 +0530 | ||
| 4 | Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Compile following linux kernel test code with latest glibc: | ||
| 10 | |||
| 11 | https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c | ||
| 12 | |||
| 13 | and we get following error: | ||
| 14 | breakpoint_test_arm64.c: In function ‘run_test’: | ||
| 15 | breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function) | ||
| 16 | if (siginfo.si_code != TRAP_HWBKPT) { | ||
| 17 | ^ | ||
| 18 | I can compile test code by modifying my local | ||
| 19 | /usr/include/bits/siginfo.h and test works great. Therefore, this patch | ||
| 20 | will be needed in upstream glibc so that issue is fixed there as well. | ||
| 21 | |||
| 22 | Signed-off-by: Pratyush Anand <panand@redhat.com> | ||
| 23 | |||
| 24 | Upstream-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 | |||
| 30 | diff --git a/bits/siginfo.h b/bits/siginfo.h | ||
| 31 | index 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 | |||
| 48 | diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h | ||
| 49 | index 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 | -- | ||
| 67 | 2.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 | ||
| 48 | NATIVESDKFIXES ?= "" | 49 | NATIVESDKFIXES ?= "" |
