Message ID | 20170323055412.10238-1-fathi.boudra@linaro.org |
---|---|
State | Accepted |
Commit | 11ebb5054e5ec1171ade90249e3a30ac8174a35a |
Headers | show |
On 23 March 2017 at 05:54, Fathi Boudra <fathi.boudra@linaro.org> wrote: > + file://0028-bits-siginfo.h-enum-definition-for-TRAP_ > HWBKPT-is-mi.patch > Not that I'm suggesting you didn't test your patch, but this line is missing a backslash... :) Ross -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
On 23 March 2017 at 13:25, Burton, Ross <ross.burton@intel.com> wrote: > > On 23 March 2017 at 05:54, Fathi Boudra <fathi.boudra@linaro.org> wrote: >> >> + >> file://0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch > > > Not that I'm suggesting you didn't test your patch, but this line is missing > a backslash... > > :) thanks for the catch. Actually, it has been tested ;) It only breaks for folks that have a bbappend (it wasn't my case). > Ross -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
On 23 March 2017 at 15:30, Fathi Boudra <fathi.boudra@linaro.org> wrote: > thanks for the catch. Actually, it has been tested ;) > It only breaks for folks that have a bbappend (it wasn't my case). > file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \ + file://0028-bits-siginfo.h-enum-definition-for-TRAP_ HWBKPT-is-mi.patch " That definitely doesn't parse, without without a bbappend. Ross -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
On Wed, Mar 22, 2017 at 10:54 PM, Fathi Boudra <fathi.boudra@linaro.org> wrote: > Patch submitted upstream, pending to be merged: > https://sourceware.org/bugzilla/show_bug.cgi?id=21286 Patch to glibc is fine provided you resent it with proper SRC_URI change and report on how it builds in OE with this change applied > > Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> > --- > ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 69 ++++++++++++++++++++++ > meta/recipes-core/glibc/glibc_2.25.bb | 1 + > 2 files changed, 70 insertions(+) > create mode 100644 meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch > > diff --git a/meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch b/meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch > new file mode 100644 > index 0000000000..fe22cc3442 > --- /dev/null > +++ b/meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.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.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 4919df543634..6dc714e8f30b 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 7b0d4f62a331..9cdf42a42557 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.9.3 > + > diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb > index cf9c4f71b8..3f3d6ae2ae 100644 > --- a/meta/recipes-core/glibc/glibc_2.25.bb > +++ b/meta/recipes-core/glibc/glibc_2.25.bb > @@ -42,6 +42,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ > file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \ > 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-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch > " > > NATIVESDKFIXES ?= "" > -- > 2.11.0 >
On 23 March 2017 at 19:22, Khem Raj <raj.khem@gmail.com> wrote: > On Wed, Mar 22, 2017 at 10:54 PM, Fathi Boudra <fathi.boudra@linaro.org> wrote: >> Patch submitted upstream, pending to be merged: >> https://sourceware.org/bugzilla/show_bug.cgi?id=21286 > > Patch to glibc is fine provided you resent it with proper SRC_URI change > and report on how it builds in OE with this change applied we'll need a v2 to address the backslash, but also the patch itself. It's currently incomplete, it misses the inclusion on other architectures siginfo headers. -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
On Thu, Mar 23, 2017 at 12:11 PM, Fathi Boudra <fathi.boudra@linaro.org> wrote: > On 23 March 2017 at 19:22, Khem Raj <raj.khem@gmail.com> wrote: >> On Wed, Mar 22, 2017 at 10:54 PM, Fathi Boudra <fathi.boudra@linaro.org> wrote: >>> Patch submitted upstream, pending to be merged: >>> https://sourceware.org/bugzilla/show_bug.cgi?id=21286 >> >> Patch to glibc is fine provided you resent it with proper SRC_URI change >> and report on how it builds in OE with this change applied > > we'll need a v2 to address the backslash, but also the patch itself. > It's currently incomplete, it misses the inclusion on other > architectures siginfo headers. yes, I saw that but I thought its not causing any regressions so we can accept it, however if you are working on pan-arch solution then we should wait. -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff --git a/meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch b/meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch new file mode 100644 index 0000000000..fe22cc3442 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.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.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 4919df543634..6dc714e8f30b 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 7b0d4f62a331..9cdf42a42557 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.9.3 + diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb index cf9c4f71b8..3f3d6ae2ae 100644 --- a/meta/recipes-core/glibc/glibc_2.25.bb +++ b/meta/recipes-core/glibc/glibc_2.25.bb @@ -42,6 +42,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \ 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-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch " NATIVESDKFIXES ?= ""
Patch submitted upstream, pending to be merged: https://sourceware.org/bugzilla/show_bug.cgi?id=21286 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> --- ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 69 ++++++++++++++++++++++ meta/recipes-core/glibc/glibc_2.25.bb | 1 + 2 files changed, 70 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0028-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch