diff mbox series

[pyro,1/2,v2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

Message ID 1523573708-6519-1-git-send-email-daniel.diaz@linaro.org
State New
Headers show
Series [pyro,1/2,v2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions | expand

Commit Message

Daniel Díaz April 12, 2018, 10:55 p.m. UTC
From: Fathi Boudra <fathi.boudra@linaro.org>

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>
---
v2: No changes.

 ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 68 ++++++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.25.bb              |  1 +
 2 files changed, 69 insertions(+)
 create mode 100644 meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch

Comments

Armin Kuster April 18, 2018, 9:51 p.m. UTC | #1
On 04/12/2018 03:55 PM, Daniel Díaz wrote:
> From: Fathi Boudra <fathi.boudra@linaro.org>
>
> 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>
In stable/pyro-next

> ---
> v2: No changes.
>
>  ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 68 ++++++++++++++++++++++
>  meta/recipes-core/glibc/glibc_2.25.bb              |  1 +
>  2 files changed, 69 insertions(+)
>  create mode 100644 meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
>
> 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 0000000..bef8887
> --- /dev/null
> +++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
> @@ -0,0 +1,68 @@
> +From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001
> +From: Pratyush Anand <panand@redhat.com>
> +Date: Wed, 22 Mar 2017 17:02:38 +0530
> +Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Compile following linux kernel test code with latest glibc:
> +
> +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
> +
> +and we get following error:
> +breakpoint_test_arm64.c: In function ‘run_test’:
> +breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function)
> +  if (siginfo.si_code != TRAP_HWBKPT) {
> +                         ^
> +I can compile test code by modifying my local
> +/usr/include/bits/siginfo.h and test works great. Therefore, this patch
> +will be needed in upstream glibc so that issue is fixed there as well.
> +
> +Signed-off-by: Pratyush Anand <panand@redhat.com>
> +
> +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=21286]
> +---
> + bits/siginfo.h                         | 6 +++++-
> + sysdeps/unix/sysv/linux/bits/siginfo.h | 6 +++++-
> + 2 files changed, 10 insertions(+), 2 deletions(-)
> +
> +diff --git a/bits/siginfo.h b/bits/siginfo.h
> +index 4919df5..6dc714e 100644
> +--- a/bits/siginfo.h
> ++++ b/bits/siginfo.h
> +@@ -140,8 +140,12 @@ enum
> + {
> +   TRAP_BRKPT = 1,		/* Process breakpoint.  */
> + #  define TRAP_BRKPT	TRAP_BRKPT
> +-  TRAP_TRACE			/* Process trace trap.  */
> ++  TRAP_TRACE,			/* Process trace trap.  */
> + #  define TRAP_TRACE	TRAP_TRACE
> ++  TRAP_BRANCH,			/* Process branch trap. */
> ++# define TRAP_BRANCH	TRAP_BRANCH
> ++  TRAP_HWBKPT			/* hardware breakpoint/watchpoint  */
> ++# define TRAP_HWBKPT	TRAP_HWBKPT
> + };
> + # endif
> + 
> +diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
> +index 7b0d4f6..9cdf42a 100644
> +--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
> ++++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
> +@@ -235,8 +235,12 @@ enum
> + {
> +   TRAP_BRKPT = 1,		/* Process breakpoint.  */
> + #  define TRAP_BRKPT	TRAP_BRKPT
> +-  TRAP_TRACE			/* Process trace trap.  */
> ++  TRAP_TRACE,			/* Process trace trap.  */
> + #  define TRAP_TRACE	TRAP_TRACE
> ++  TRAP_BRANCH,			/* Process branch trap. */
> ++# define TRAP_BRANCH	TRAP_BRANCH
> ++  TRAP_HWBKPT			/* hardware breakpoint/watchpoint  */
> ++# define TRAP_HWBKPT	TRAP_HWBKPT
> + };
> + # endif
> + 
> +-- 
> +2.7.4
> +
> diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb
> index 58b90b7..49fcf0c 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 \
>             file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
>             file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \
>             file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \
> +           file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \
>  "
>  
>  NATIVESDKFIXES ?= ""
diff mbox series

Patch

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 0000000..bef8887
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch
@@ -0,0 +1,68 @@ 
+From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001
+From: Pratyush Anand <panand@redhat.com>
+Date: Wed, 22 Mar 2017 17:02:38 +0530
+Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compile following linux kernel test code with latest glibc:
+
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c
+
+and we get following error:
+breakpoint_test_arm64.c: In function ‘run_test’:
+breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function)
+  if (siginfo.si_code != TRAP_HWBKPT) {
+                         ^
+I can compile test code by modifying my local
+/usr/include/bits/siginfo.h and test works great. Therefore, this patch
+will be needed in upstream glibc so that issue is fixed there as well.
+
+Signed-off-by: Pratyush Anand <panand@redhat.com>
+
+Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=21286]
+---
+ bits/siginfo.h                         | 6 +++++-
+ sysdeps/unix/sysv/linux/bits/siginfo.h | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/bits/siginfo.h b/bits/siginfo.h
+index 4919df5..6dc714e 100644
+--- a/bits/siginfo.h
++++ b/bits/siginfo.h
+@@ -140,8 +140,12 @@ enum
+ {
+   TRAP_BRKPT = 1,		/* Process breakpoint.  */
+ #  define TRAP_BRKPT	TRAP_BRKPT
+-  TRAP_TRACE			/* Process trace trap.  */
++  TRAP_TRACE,			/* Process trace trap.  */
+ #  define TRAP_TRACE	TRAP_TRACE
++  TRAP_BRANCH,			/* Process branch trap. */
++# define TRAP_BRANCH	TRAP_BRANCH
++  TRAP_HWBKPT			/* hardware breakpoint/watchpoint  */
++# define TRAP_HWBKPT	TRAP_HWBKPT
+ };
+ # endif
+ 
+diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h
+index 7b0d4f6..9cdf42a 100644
+--- a/sysdeps/unix/sysv/linux/bits/siginfo.h
++++ b/sysdeps/unix/sysv/linux/bits/siginfo.h
+@@ -235,8 +235,12 @@ enum
+ {
+   TRAP_BRKPT = 1,		/* Process breakpoint.  */
+ #  define TRAP_BRKPT	TRAP_BRKPT
+-  TRAP_TRACE			/* Process trace trap.  */
++  TRAP_TRACE,			/* Process trace trap.  */
+ #  define TRAP_TRACE	TRAP_TRACE
++  TRAP_BRANCH,			/* Process branch trap. */
++# define TRAP_BRANCH	TRAP_BRANCH
++  TRAP_HWBKPT			/* hardware breakpoint/watchpoint  */
++# define TRAP_HWBKPT	TRAP_HWBKPT
+ };
+ # endif
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb
index 58b90b7..49fcf0c 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 \
            file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
            file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \
            file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \
+           file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \
 "
 
 NATIVESDKFIXES ?= ""