[gnome-continuous-yocto/gnomeostree-3.28-rocko: 169/218] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions



commit e81d780f73083af4c51525b4240bc6e4beaf07e4
Author: Fathi Boudra <fathi boudra linaro org>
Date:   Tue Mar 13 10:06:53 2018 -0600

    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: 16bef85e5616f123394c2376ab62f9bf10194abd)
    
    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>

 ...o-consts.h-enum-definition-for-TRAP_HWBKP.patch |   69 ++++++++++++++++++++
 meta/recipes-core/glibc/glibc_2.26.bb              |    1 +
 2 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch 
b/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
new file mode 100644
index 0000000..436c847
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
@@ -0,0 +1,69 @@
+From af3054b3856379d353a779801678f330e1b58c9a Mon Sep 17 00:00:00 2001
+Message-Id: <af3054b3856379d353a779801678f330e1b58c9a 1490183611 git panand redhat com>
+From: Pratyush Anand <panand redhat com>
+Date: Wed, 22 Mar 2017 17:02:38 +0530
+Subject: [PATCH] bits/siginfo-consts.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-consts.h                         | 6 +++++-
+ sysdeps/unix/sysv/linux/bits/siginfo-consts.h | 6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/bits/siginfo-consts.h b/bits/siginfo-consts.h
+index a58ac4b..8448fac 100644
+--- a/bits/siginfo-consts.h
++++ b/bits/siginfo-consts.h
+@@ -106,8 +106,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-consts.h b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
+index 525840c..57a9edb 100644
+--- a/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
++++ b/sysdeps/unix/sysv/linux/bits/siginfo-consts.h
+@@ -137,8 +137,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.26.bb b/meta/recipes-core/glibc/glibc_2.26.bb
index 464b654..30dfe4d 100644
--- a/meta/recipes-core/glibc/glibc_2.26.bb
+++ b/meta/recipes-core/glibc/glibc_2.26.bb
@@ -42,6 +42,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0025-locale-fix-hard-coded-reference-to-gcc-E.patch \
            file://0027-glibc-reset-dl-load-write-lock-after-forking.patch \
            file://0028-Bug-4578-add-ld.so-lock-while-fork.patch \
+           file://0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
 "
 
 NATIVESDKFIXES ?= ""


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]