Re: [OE-core] [PATCH] perf: Add /scripts to sources

2019-11-14 Thread Daniel Díaz
Hello!

On Mon, 4 Nov 2019 at 17:42, Bruce Ashfield  wrote:
> On Mon, Nov 4, 2019 at 5:56 PM Daniel Díaz  wrote:
> > On Thu, 24 Oct 2019 at 13:34, Daniel Díaz  wrote:
> > > As of linux-next-20191022, we need bpf_helpers_doc.py in order to
> > > build libbpf, which lives in /scripts. Otherwise, do_compile fails
> > > with:
> > > | /bin/sh: 1: 
> > > /oe/build/tmp/work/machine-triplet/perf/1.0-r9/perf-1.0/scripts/bpf_helpers_doc.py:
> > >  not found
> > > | Makefile:184: recipe for target 'bpf_helper_defs.h' failed
> > >
> > > See commit e01a75c159691 ("libbpf: Move bpf_{helpers, helper_defs,
> > > endian, tracing}.h into libbpf") from linux-next.
> > >
> > > Signed-off-by: Daniel Díaz 
> > > ---
> > >  meta/recipes-kernel/perf/perf.bb | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/meta/recipes-kernel/perf/perf.bb 
> > > b/meta/recipes-kernel/perf/perf.bb
> > > index 8201c0cb60..a463eebc52 100644
> > > --- a/meta/recipes-kernel/perf/perf.bb
> > > +++ b/meta/recipes-kernel/perf/perf.bb
> > > @@ -113,6 +113,7 @@ PERF_SRC ?= "Makefile \
> > >   tools/Makefile \
> > >   tools/perf \
> > >   tools/scripts \
> > > + scripts \
> > >  "
> > >
> > >  PERF_EXTRA_LDFLAGS = ""
> > > --
> > > 2.20.1
> >
> > Ping.
>
> I just went through trying to reduce the amount of source that we copy
> for perf, since it has often ended up causing us maintenance pain.
>
> Can we just copy the one script we need, versus a complete copy of the
> directory ?
>
> My patch from a few weeks ago, makes it safe to copy a single file, so
> it should be doable.

I am unable to test that as I'm still stuck on Sumo. I can confirm
that "scripts/bpf_helpers_doc.py" doesn't work in such an old version,
whereas "scripts" does.

Thanks and greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] perf: Add /scripts to sources

2019-11-04 Thread Daniel Díaz
Hello!

On Thu, 24 Oct 2019 at 13:34, Daniel Díaz  wrote:
> As of linux-next-20191022, we need bpf_helpers_doc.py in order to
> build libbpf, which lives in /scripts. Otherwise, do_compile fails
> with:
> | /bin/sh: 1: 
> /oe/build/tmp/work/machine-triplet/perf/1.0-r9/perf-1.0/scripts/bpf_helpers_doc.py:
>  not found
> | Makefile:184: recipe for target 'bpf_helper_defs.h' failed
>
> See commit e01a75c159691 ("libbpf: Move bpf_{helpers, helper_defs,
> endian, tracing}.h into libbpf") from linux-next.
>
> Signed-off-by: Daniel Díaz 
> ---
>  meta/recipes-kernel/perf/perf.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb 
> b/meta/recipes-kernel/perf/perf.bb
> index 8201c0cb60..a463eebc52 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -113,6 +113,7 @@ PERF_SRC ?= "Makefile \
>   tools/Makefile \
>   tools/perf \
>   tools/scripts \
> + scripts \
>  "
>
>  PERF_EXTRA_LDFLAGS = ""
> --
> 2.20.1

Ping.

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] perf: Add /scripts to sources

2019-10-24 Thread Daniel Díaz
As of linux-next-20191022, we need bpf_helpers_doc.py in order to
build libbpf, which lives in /scripts. Otherwise, do_compile fails
with:
| /bin/sh: 1: 
/oe/build/tmp/work/machine-triplet/perf/1.0-r9/perf-1.0/scripts/bpf_helpers_doc.py:
 not found
| Makefile:184: recipe for target 'bpf_helper_defs.h' failed

See commit e01a75c159691 ("libbpf: Move bpf_{helpers, helper_defs,
endian, tracing}.h into libbpf") from linux-next.

Signed-off-by: Daniel Díaz 
---
 meta/recipes-kernel/perf/perf.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 8201c0cb60..a463eebc52 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -113,6 +113,7 @@ PERF_SRC ?= "Makefile \
  tools/Makefile \
  tools/perf \
  tools/scripts \
+ scripts \
 "
 
 PERF_EXTRA_LDFLAGS = ""
-- 
2.20.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Add patch for string formatting security warning

2019-02-25 Thread Daniel Díaz
A revamp of the syscalls/setregid tests made to use a new
library [LTP:7a1b4427] required a conversion to test messages.
This test in particular did not include a formatted string,
but a just a string element:
  testcases/kernel/syscalls/setregid/setregid01.c

This patch allows LTP to be built with -Wformat,
-Wformat-security, and -Werror=format-security.

Signed-off-by: Daniel Díaz 
---
 ...etregid01-security-string-formatting.patch | 46 +++
 meta/recipes-extended/ltp/ltp_20190115.bb |  6 +--
 2 files changed, 47 insertions(+), 5 deletions(-)
 create mode 100644 
meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch 
b/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch
new file mode 100644
index 00..24449148f2
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/setregid01-security-string-formatting.patch
@@ -0,0 +1,46 @@
+From 430e05c2169ed15aaa6d7f9459edd607603cee02 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= 
+Date: Mon, 25 Feb 2019 10:44:33 -0600
+Subject: [PATCH] setregid01: Fix security warning for string formatting
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 8.2.0 complains with the following:
+  setregid01.c: In function 'run':
+  setregid01.c:47:3: error: format not a string literal and no format 
arguments [-Werror=format-security]
+ tst_res(TFAIL | TTERRNO, tc->msg);
+ ^~~
+because there is no string formatting in the message. This can
+be seen with CFLAGS set to:
+  -Wformat -Wformat-security -Werror=format-security
+as Yocto Project's Poky does, e.g.:
+  http://errors.yoctoproject.org/Errors/Details/230043/
+
+Upstream-Status: Backport [46e1eda55f188810e6bf3a939b92d604321807ae]
+
+Signed-off-by: Daniel Díaz 
+Reviewed-by: Enji Cooper 
+---
+ testcases/kernel/syscalls/setregid/setregid01.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/setregid/setregid01.c 
b/testcases/kernel/syscalls/setregid/setregid01.c
+index f2e41e134..8c9e11918 100644
+--- a/testcases/kernel/syscalls/setregid/setregid01.c
 b/testcases/kernel/syscalls/setregid/setregid01.c
+@@ -44,9 +44,9 @@ static void run(unsigned int n)
+   TEST(SETREGID(*tc->arg1, *tc->arg2));
+ 
+   if (TST_RET == -1)
+-  tst_res(TFAIL | TTERRNO, tc->msg);
++  tst_res(TFAIL | TTERRNO, "%s", tc->msg);
+   else
+-  tst_res(TPASS, tc->msg);
++  tst_res(TPASS, "%s", tc->msg);
+ }
+ 
+ static void setup(void)
+-- 
+2.17.1
+
diff --git a/meta/recipes-extended/ltp/ltp_20190115.bb 
b/meta/recipes-extended/ltp/ltp_20190115.bb
index ed1cb27112..ddf97e26ce 100644
--- a/meta/recipes-extended/ltp/ltp_20190115.bb
+++ b/meta/recipes-extended/ltp/ltp_20190115.bb
@@ -29,11 +29,6 @@ CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
 CFLAGS_append_mipsarchn64 = " -D__SANE_USERSPACE_TYPES__"
 SRCREV = "a6a5caef13632e669dda27b0461726eba546a2f3"
 
-# ltp doesn't currently build cleanly with
-# "-Wformat -Wformat-security -Werror=format-security" in CFLAGS
-# remove this when it does
-SECURITY_STRINGFORMAT = ""
-
 SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0004-build-Add-option-to-select-libc-implementation.patch \

file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
@@ -53,6 +48,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \

file://0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch \
file://define-sigrtmin-and-sigrtmax-for-musl.patch \
+   file://setregid01-security-string-formatting.patch \
"
 
 S = "${WORKDIR}/git"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] ltp: Bump to 20190115

2019-02-25 Thread Daniel Díaz
Hello!
On Sat, 23 Feb 2019 at 10:07, Richard Purdie
 wrote:
>
> On Thu, 2019-02-21 at 12:21 -0600, Daniel Díaz wrote:
> > This patch has been refreshed:
> > * 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
> >
> > These patches have been dropped as they have been merged:
> > * 0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
> > * 0001-setrlimit05-Use-another-method-to-get-bad-address.patch
> > * 0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
> > * 0001-statx-fix-compile-errors.patch
> > * 0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
> > * 0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
> >
> > This patch has been added:
> > * define-sigrtmin-and-sigrtmax-for-musl.patch
> >
> > Added these rdependencies:
> > * file: for ld01, file01 and logrotate
> > * quota: for quota_remount_test01
> >
> > Signed-off-by: Daniel Díaz 
>
> I think there was already a previous version of this upgrade which also
> didn't work:
>
> http://errors.yoctoproject.org/Errors/Latest/?filter=480efd388db578106a8a2129c0382b7e56a1ee36=commit=150
> From the -Wformat-security -Werror=format-security security flags.

I thought the problems were with MUSL and Glibc 2.29 (for which I
built). Let me look at these problems, then.

Thanks and greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: Bump to 20190115

2019-02-21 Thread Daniel Díaz
This patch has been refreshed:
* 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch

These patches have been dropped as they have been merged:
* 0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
* 0001-setrlimit05-Use-another-method-to-get-bad-address.patch
* 0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
* 0001-statx-fix-compile-errors.patch
* 0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
* 0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch

This patch has been added:
* define-sigrtmin-and-sigrtmax-for-musl.patch

Added these rdependencies:
* file: for ld01, file01 and logrotate
* quota: for quota_remount_test01

Signed-off-by: Daniel Díaz 
---
 ...getcpu-to-avoid-conflict-with-glibc-.patch |  57 --
 ...use-ping-6-when-ping6-is-not-avaliab.patch |  45 -
 ...suite-mmap24-2-Relax-condition-a-bit.patch |   6 +-
 ...se-another-method-to-get-bad-address.patch |  61 --
 ...-recent-glibc-calls-syscall-directly.patch |  75 ---
 .../ltp/0001-statx-fix-compile-errors.patch   |  35 
 ...ake-OFD-command-use-fcntl64-syscall-.patch | 184 -
 ...option-to-select-libc-implementation.patch |   3 +-
 ...E-undeclared-when-building-with-musl.patch |   2 +-
 ...BC_PREREQ-is-defined-before-using-it.patch | 190 +++---
 .../ltp/0035-fix-test_proc_kill-hang.patch|   2 +-
 ...1-Fix-for-test-in-deterministic-mode.patch |   2 +-
 ...efine-sigrtmin-and-sigrtmax-for-musl.patch | 114 +++
 .../ltp/{ltp_20180926.bb => ltp_20190115.bb}  |  11 +-
 14 files changed, 154 insertions(+), 633 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch
 create mode 100644 
meta/recipes-extended/ltp/ltp/define-sigrtmin-and-sigrtmax-for-musl.patch
 rename meta/recipes-extended/ltp/{ltp_20180926.bb => ltp_20190115.bb} (91%)

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
 
b/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
deleted file mode 100644
index d0c847774d..00
--- 
a/meta/recipes-extended/ltp/ltp/0001-getcpu01-Rename-getcpu-to-avoid-conflict-with-glibc-.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From c9edb0eaaca83c18ac7b5ea3330faad8d47d3fd1 Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Fri, 14 Dec 2018 06:44:02 -0800
-Subject: [PATCH] getcpu01: Rename getcpu to avoid conflict with glibc >= 2.29
-
-glibc has added getcpu() API starting with glibc 2.29 release, this
-makes the static function in conflict and signatures are not same as
-well.
-
-Renaming helps to keep ltp build going
-
-Upstream-Status: Submitted 
[http://lists.linux.it/pipermail/ltp/2018-December/010321.html]
-
-Signed-off-by: Khem Raj 

- testcases/kernel/syscalls/getcpu/getcpu01.c | 10 +-
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/getcpu/getcpu01.c 
b/testcases/kernel/syscalls/getcpu/getcpu01.c
-index c927512ca..e850fe844 100644
 a/testcases/kernel/syscalls/getcpu/getcpu01.c
-+++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
-@@ -82,7 +82,7 @@ int sys_support = 0;
- 
- void cleanup(void);
- void setup(void);
--static inline int getcpu(unsigned int *, unsigned int *, void *);
-+static inline int get_cpu(unsigned int *, unsigned int *, void *);
- unsigned int set_cpu_affinity(void);
- unsigned int get_nodeid(unsigned int);
- unsigned int max_cpuid(size_t, cpu_set_t *);
-@@ -124,7 +124,7 @@ int main(int ac, char **av)
- #ifdef __i386__
-   node_set = get_nodeid(cpu_set);
- #endif
--  TEST(getcpu(_id, _id, NULL));
-+  TEST(get_cpu(_id, _id, NULL));
-   if (TEST_RETURN == 0) {
-   if (cpu_id != cpu_set) {
-   tst_resm(TFAIL, "getcpu() returned wrong value"
-@@ -157,10 +157,10 @@ int main(int ac, char **av)
- }
- 
- /*
-- * getcpu() - calls the system call
-+ * get_cpu() - calls the system call
-  */
--static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
--   void *cache_struct)
-+static inline int get_cpu(unsigned *cpu_id, unsigned *node_id,
-+void *cache_struct)
- {
- #if defined(__i386__)
-   return syscall(318, cpu_id, node_id, cache_struct);
--- 
-2.20.0
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-

[OE-core] [PATCH] ltp: Delete unneeded patch for FNM_EXTMATCH

2018-11-19 Thread Daniel Díaz
The patch in question was reworked, merged and released by
upstream version 20180926, as commit 822ad2043379.

Signed-off-by: Daniel Díaz 
---
 ...FNM_EXTMATCH-if-not-already-like-und.patch | 44 ---
 meta/recipes-extended/ltp/ltp_20180926.bb |  1 -
 2 files changed, 45 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch

diff --git 
a/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
 
b/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
deleted file mode 100644
index 0245a89f3d..00
--- 
a/meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 23518508de307790231d16af307291f1b45e903a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20D=C3=ADaz?= 
-Date: Tue, 5 Jun 2018 15:36:30 -0500
-Subject: [PATCH] read_all: Define FNM_EXTMATCH if not already (like under
- musl).
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-With musl, FNM_EXTMATCH is not defined:
-| read_all.c: In function 'read_test':
-| read_all.c:201:41: error: 'FNM_EXTMATCH' undeclared (first use in this 
function); did you mean 'FNM_NOMATCH'?
-|   if (exclude && !fnmatch(exclude, path, FNM_EXTMATCH)) {
-|  ^~~~
-|  FNM_NOMATCH
-| read_all.c:201:41: note: each undeclared identifier is reported only once 
for each function it appears in
-| : recipe for target 'read_all' failed
-| make[4]: *** [read_all] Error 1
-
-Signed-off-by: Daniel Díaz 
-
-Upstream-Status: Pending

- testcases/kernel/fs/read_all/read_all.c | 4 
- 1 file changed, 4 insertions(+)
-
-diff --git a/testcases/kernel/fs/read_all/read_all.c 
b/testcases/kernel/fs/read_all/read_all.c
-index a8e1611..e9ff47a 100644
 a/testcases/kernel/fs/read_all/read_all.c
-+++ b/testcases/kernel/fs/read_all/read_all.c
-@@ -59,6 +59,10 @@
- #define MAX_PATH 4096
- #define MAX_DISPLAY 40
- 
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- struct queue {
-   sem_t sem;
-   int front;
--- 
-2.7.4
-
diff --git a/meta/recipes-extended/ltp/ltp_20180926.bb 
b/meta/recipes-extended/ltp/ltp_20180926.bb
index 622c1f42f7..500ca0063d 100644
--- a/meta/recipes-extended/ltp/ltp_20180926.bb
+++ b/meta/recipes-extended/ltp/ltp_20180926.bb
@@ -46,7 +46,6 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git \
file://0035-fix-test_proc_kill-hang.patch \

file://0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch \
file://0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch \
-   
file://0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch \

file://0001-syscalls-fcntl-make-OFD-command-use-fcntl64-syscall-.patch \
file://0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch 
\

file://0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch \
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20180926

2018-11-01 Thread Daniel Díaz
Hello!

On Thu, 1 Nov 2018 at 11:58, Petr Vorel  wrote:
> > Patch 0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
> > also made it upstream, albeit with a different implementation. See
> > commit 822ad20433799193e2180862137c36f24e5d27d6.
> Well, I haven't replaced this one with upgrade :(.
> Shell I post v3? Or will you do it in separate commit?

Needs to be dropped:
0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch was
reworked and merged as 822ad204 in time for the 20180926 release.

Thanks and greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] ltp: Update to 20180926

2018-11-01 Thread Daniel Díaz
Hello!

On Sun, 7 Oct 2018 at 14:43, Petr Vorel  wrote:
> License-Update: Removed pounder21 in 20180926
>
> New patches
> * 0001-statx-fix-compile-errors.patch

Oh, boy, thanks for finding that patch -- caused me lots of troubles.

Since you sent v2 of this patch there's been a couple of patches added:
* 0001-sigwaitinfo01-recent-glibc-calls-syscall-directly.patch
* 0001-netns_helper.sh-use-ping-6-when-ping6-is-not-avaliab.patch
* 0001-open_posix_testsuite-mmap24-2-Relax-condition-a-bit.patch

Do we want those in?

> Rebased patches
> * 0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
>
> Removed removed (accepted in upstream)
> * 0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
> * 0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
> * 0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch

Patch 0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
also made it upstream, albeit with a different implementation. See
commit 822ad20433799193e2180862137c36f24e5d27d6.

Thanks and greetings!

Daniel Díaz
daniel.d...@linaro.org



> Removed patches (different fix accepted in upstream)
> * 0001-mmap15-mips64-return-EINVAL.patch
>
> Signed-off-by: Petr Vorel 
> ---
> Changes v1->v2:
> * Fixed LIC_FILES_CHKSUM error (add "License-Update: Removed pounder21
>   in 20180926" to commit message)
> * Add missing Upstream-Status for 0001-statx-fix-compile-errors.patch
>
>
> Kind regards,
> Petr
> ---
>  .../0001-mmap15-mips64-return-EINVAL.patch| 41 
>  .../ltp/0001-statx-fix-compile-errors.patch   | 38 
>  ...1-Fix-for-test-in-deterministic-mode.patch | 42 
>  ...mat-for-0-or-PAGESIZE-with-RND-flag-.patch | 97 ---
>  c-Fix-too-small-name-string-and-rel.patch | 34 ---
>  ...S_ISGID-check-on-files-created-by-no.patch | 81 
>  .../ltp/{ltp_20180515.bb => ltp_20180926.bb}  |  8 +-
>  7 files changed, 62 insertions(+), 279 deletions(-)
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
>  create mode 100644 
> meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
>  rename meta/recipes-extended/ltp/{ltp_20180515.bb => ltp_20180926.bb} (93%)
>
> diff --git 
> a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch 
> b/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
> deleted file mode 100644
> index 18eba27c2d..00
> --- a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001
> -From: Dengke Du 
> -Date: Wed, 12 Sep 2018 14:24:35 +0800
> -Subject: [PATCH] mmap15: mips64 return EINVAL
> -
> -In mips64 kernel, system check the addr that passed to mmap:
> -
> -if (TASK_SIZE - len < addr)
> -return -EINVAL;
> -
> -Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71
> -
> -Upstream-Status: Submitted 
> [https://github.com/linux-test-project/ltp/pull/394]
> -
> -Signed-off-by: Dengke Du 
> 
> - testcases/kernel/syscalls/mmap/mmap15.c | 5 +
> - 1 file changed, 5 insertions(+)
> -
> -diff --git a/testcases/kernel/syscalls/mmap/mmap15.c 
> b/testcases/kernel/syscalls/mmap/mmap15.c
> -index eff27d6..a10b5c7 100644
>  a/testcases/kernel/syscalls/mmap/mmap15.c
> -+++ b/testcases/kernel/syscalls/mmap/mmap15.c
> -@@ -81,9 +81,14 @@ int main(int ac, char **av)
> -   }
> -
> -   if (errno != ENOMEM) {
> -+#ifdef __mips__
> -+  tst_resm(TPASS | TERRNO, "mmap into high region "
> -+ "failed as expected");
> -+#else
> -   tst_resm(TFAIL | TERRNO, "mmap into high region "
> -"failed unexpectedly - expect "
> -"errno=ENOMEM, got");
> -+#endif
> -   } else {
> -   tst_resm(TPASS | TERRNO, "mmap into high region "
> -"failed as expected");
> ---
> -2.7.4
> -
> diff --git 
> a/meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.patch 
> b/meta/recipes-extended/ltp/ltp/0001-statx-fix-compile-errors.

Re: [OE-core] [PATCH][RFC] ltp: bump to release 20180926

2018-11-01 Thread Daniel Díaz
Hello!

Please disregard this patch below. I just saw Petr's submission for
this new version of LTP which includes a fix needed for Thud and
master.

Sorry for the noise.

Greetings!

Daniel Díaz
daniel.d...@linaro.org




On Thu, 1 Nov 2018 at 07:12, Daniel Díaz  wrote:
>
> The following patches have made it to upstream:
> * 0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch
> * 0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
> * 0042-cve-meltdown-read-saved_command_line.patch
> * 0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
>
> This patch was replaced by another, different patch upstream:
> * 0001-mmap15-mips64-return-EINVAL.patch
>
> These patches have been refreshed in order to apply cleanly
> and without any fuzz:
> * 0004-build-Add-option-to-select-libc-implementation.patch
> * 0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
> * 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
> * 0035-fix-test_proc_kill-hang.patch
> * 0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch
>
> The LICENSE for tools/pounder21 has been removed as that code
> was dropped altogether from LTP: "It's is obsolete, not being
> built."
>
> Signed-off-by: Daniel Díaz 
> ---
>  .../0001-mmap15-mips64-return-EINVAL.patch| 41 
>  ...option-to-select-libc-implementation.patch |  2 +-
>  ...E-undeclared-when-building-with-musl.patch |  2 +-
>  ...BC_PREREQ-is-defined-before-using-it.patch | 98 ---
>  .../ltp/0035-fix-test_proc_kill-hang.patch|  2 +-
>  ...1-Fix-for-test-in-deterministic-mode.patch | 38 +++
>  ...FNM_EXTMATCH-if-not-already-like-und.patch | 44 -
>  ...mat-for-0-or-PAGESIZE-with-RND-flag-.patch | 97 --
>  c-Fix-too-small-name-string-and-rel.patch | 34 ---
>  ...S_ISGID-check-on-files-created-by-no.patch | 81 ---
>  .../ltp/{ltp_20180515.bb => ltp_20180926.bb}  |  8 +-
>  11 files changed, 66 insertions(+), 381 deletions(-)
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
>  delete mode 100644 
> meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
>  rename meta/recipes-extended/ltp/{ltp_20180515.bb => ltp_20180926.bb} (92%)
>
> diff --git 
> a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch 
> b/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
> deleted file mode 100644
> index 18eba27c2d..00
> --- a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
> +++ /dev/null
> @@ -1,41 +0,0 @@
> -From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001
> -From: Dengke Du 
> -Date: Wed, 12 Sep 2018 14:24:35 +0800
> -Subject: [PATCH] mmap15: mips64 return EINVAL
> -
> -In mips64 kernel, system check the addr that passed to mmap:
> -
> -if (TASK_SIZE - len < addr)
> -return -EINVAL;
> -
> -Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71
> -
> -Upstream-Status: Submitted 
> [https://github.com/linux-test-project/ltp/pull/394]
> -
> -Signed-off-by: Dengke Du 
> 
> - testcases/kernel/syscalls/mmap/mmap15.c | 5 +
> - 1 file changed, 5 insertions(+)
> -
> -diff --git a/testcases/kernel/syscalls/mmap/mmap15.c 
> b/testcases/kernel/syscalls/mmap/mmap15.c
> -index eff27d6..a10b5c7 100644
>  a/testcases/kernel/syscalls/mmap/mmap15.c
> -+++ b/testcases/kernel/syscalls/mmap/mmap15.c
> -@@ -81,9 +81,14 @@ int main(int ac, char **av)
> -   }
> -
> -   if (errno != ENOMEM) {
> -+#ifdef __mips__
> -+  tst_resm(TPASS | TERRNO, "mmap into high region "
> -+ "failed as expected");
> -+#else
> -   tst_resm(TFAIL | TERRNO, "mmap into high region "
> -"failed unexpectedly - expect "
> -"errno=ENOMEM, got");
> -+#endif
> -   } else {
> -   tst_resm(TPASS | TERRNO, "mmap into high region "
> -"failed as expected");
> ---
> -2.7.4
> -
> diff --git 
> a/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementa

[OE-core] [PATCH][RFC] ltp: bump to release 20180926

2018-11-01 Thread Daniel Díaz
The following patches have made it to upstream:
* 0040-fs-read_all-define-FNM_EXTMATCH-if-needed.patch
* 0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
* 0042-cve-meltdown-read-saved_command_line.patch
* 0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch

This patch was replaced by another, different patch upstream:
* 0001-mmap15-mips64-return-EINVAL.patch

These patches have been refreshed in order to apply cleanly
and without any fuzz:
* 0004-build-Add-option-to-select-libc-implementation.patch
* 0007-fix-__WORDSIZE-undeclared-when-building-with-musl.patch
* 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
* 0035-fix-test_proc_kill-hang.patch
* 0039-commands-ar01-Fix-for-test-in-deterministic-mode.patch

The LICENSE for tools/pounder21 has been removed as that code
was dropped altogether from LTP: "It's is obsolete, not being
built."

Signed-off-by: Daniel Díaz 
---
 .../0001-mmap15-mips64-return-EINVAL.patch| 41 
 ...option-to-select-libc-implementation.patch |  2 +-
 ...E-undeclared-when-building-with-musl.patch |  2 +-
 ...BC_PREREQ-is-defined-before-using-it.patch | 98 ---
 .../ltp/0035-fix-test_proc_kill-hang.patch|  2 +-
 ...1-Fix-for-test-in-deterministic-mode.patch | 38 +++
 ...FNM_EXTMATCH-if-not-already-like-und.patch | 44 -
 ...mat-for-0-or-PAGESIZE-with-RND-flag-.patch | 97 --
 c-Fix-too-small-name-string-and-rel.patch | 34 ---
 ...S_ISGID-check-on-files-created-by-no.patch | 81 ---
 .../ltp/{ltp_20180515.bb => ltp_20180926.bb}  |  8 +-
 11 files changed, 66 insertions(+), 381 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0041-cve-2017-5669-shmat-for-0-or-PAGESIZE-with-RND-flag-.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0042-fs-ftest-ftest06.c-Fix-too-small-name-string-and-rel.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0043-open-creat-skip-S_ISGID-check-on-files-created-by-no.patch
 rename meta/recipes-extended/ltp/{ltp_20180515.bb => ltp_20180926.bb} (92%)

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch 
b/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
deleted file mode 100644
index 18eba27c2d..00
--- a/meta/recipes-extended/ltp/ltp/0001-mmap15-mips64-return-EINVAL.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b909805b4fc1b72e0ce299afb4abc02720ee81da Mon Sep 17 00:00:00 2001
-From: Dengke Du 
-Date: Wed, 12 Sep 2018 14:24:35 +0800
-Subject: [PATCH] mmap15: mips64 return EINVAL
-
-In mips64 kernel, system check the addr that passed to mmap:
-
-if (TASK_SIZE - len < addr)
-return -EINVAL;
-
-Link: https://github.com/torvalds/linux/blob/master/arch/mips/mm/mmap.c#L71
-
-Upstream-Status: Submitted [https://github.com/linux-test-project/ltp/pull/394]
-
-Signed-off-by: Dengke Du 

- testcases/kernel/syscalls/mmap/mmap15.c | 5 +
- 1 file changed, 5 insertions(+)
-
-diff --git a/testcases/kernel/syscalls/mmap/mmap15.c 
b/testcases/kernel/syscalls/mmap/mmap15.c
-index eff27d6..a10b5c7 100644
 a/testcases/kernel/syscalls/mmap/mmap15.c
-+++ b/testcases/kernel/syscalls/mmap/mmap15.c
-@@ -81,9 +81,14 @@ int main(int ac, char **av)
-   }
- 
-   if (errno != ENOMEM) {
-+#ifdef __mips__
-+  tst_resm(TPASS | TERRNO, "mmap into high region "
-+ "failed as expected");   
 
-+#else
-   tst_resm(TFAIL | TERRNO, "mmap into high region "
-"failed unexpectedly - expect "
-"errno=ENOMEM, got");
-+#endif
-   } else {
-   tst_resm(TPASS | TERRNO, "mmap into high region "
-"failed as expected");
--- 
-2.7.4
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
 
b/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
index 2df385591b..8fd6d0fad0 100644
--- 
a/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
+++ 
b/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
@@ -42,7 +42,7 @@ diff --git a/testcases/kernel/Makefile 
b/testcases/kernel/Makefile
 index 50a12fa..4f1987f 100644
 --- a/testcases/kernel/Makefile
 +++ b/testcases/kernel/Makefile
-@@ -48,13 +48,16 @@ SUBDIRS+= connectors \
+@@ -49,13 +49,16 @@ SUBDIRS+= connectors \
   logging \
   mem \
   numa \

[OE-core] [sumo][PATCH 2/2] multilib_header: recognize BPF as a target

2018-08-14 Thread Daniel Díaz
When building with `clang -target bpf` using the
multilib_header, a recursion was unavoidable because
bits/wordsize.h would #include itself, still lacking
a definition for __MHWORDSIZE or __WORDSIZE.

(From OE-Core rev: 70b41b3c335a80b4ac243f468f22331d261299db)

Signed-off-by: Daniel Díaz 
Signed-off-by: Richard Purdie 
---
 scripts/multilib_header_wrapper.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/multilib_header_wrapper.h 
b/scripts/multilib_header_wrapper.h
index f516673..9660225 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -22,7 +22,9 @@
  */
 
 
-#if defined (__arm__)
+#if defined (__bpf__)
+#define __MHWORDSIZE   64
+#elif defined (__arm__)
 #define __MHWORDSIZE   32
 #elif defined (__aarch64__) && defined ( __LP64__)
 #define __MHWORDSIZE   64
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [sumo][PATCH 1/2] glibc: Make bits/wordsize.h multilibbed again

2018-08-14 Thread Daniel Díaz
As reported by ChenQi, leaving bits/wordsize.h out of being
multilibbed introduced a problem in building the SDK for
arm64:
  Error: Transaction check error:
file /usr/include/bits/wordsize.h conflicts between attempted installs of 
lib32-libc6-dev-2.27-r0.armv7vet2hf_vfp and libc6-dev-2.27-r0.aarch64

This effectively reverts commit a74c77d6.

(From OE-Core rev: 90ad502bf8faa233e25cf297c1eeefcb0367aea3)

Signed-off-by: Daniel Díaz 
Signed-off-by: Richard Purdie 
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 35f5231..c1d186a 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -137,7 +137,7 @@ do_install_append_armeb () {
 }
 
 do_install_armmultilib () {
-   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
+   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [rocko][PATCH] multilib_header: recognize BPF as a target

2018-08-14 Thread Daniel Díaz
When building with `clang -target bpf` using the
multilib_header, a recursion was unavoidable because
bits/wordsize.h would #include itself, still lacking
a definition for __MHWORDSIZE or __WORDSIZE.

(From OE-Core rev: 70b41b3c335a80b4ac243f468f22331d261299db)

Signed-off-by: Daniel Díaz 
Signed-off-by: Richard Purdie 
---
 scripts/multilib_header_wrapper.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/multilib_header_wrapper.h 
b/scripts/multilib_header_wrapper.h
index f516673..9660225 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -22,7 +22,9 @@
  */
 
 
-#if defined (__arm__)
+#if defined (__bpf__)
+#define __MHWORDSIZE   64
+#elif defined (__arm__)
 #define __MHWORDSIZE   32
 #elif defined (__aarch64__) && defined ( __LP64__)
 #define __MHWORDSIZE   64
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] multilib_header: recognize BPF as a target

2018-08-09 Thread Daniel Díaz
When building with `clang -target bpf` using the
multilib_header, a recursion was unavoidable because
bits/wordsize.h would #include itself, still lacking
a definition for __MHWORDSIZE or __WORDSIZE.

Signed-off-by: Daniel Díaz 
---
 scripts/multilib_header_wrapper.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/multilib_header_wrapper.h 
b/scripts/multilib_header_wrapper.h
index f516673..9660225 100644
--- a/scripts/multilib_header_wrapper.h
+++ b/scripts/multilib_header_wrapper.h
@@ -22,7 +22,9 @@
  */
 
 
-#if defined (__arm__)
+#if defined (__bpf__)
+#define __MHWORDSIZE   64
+#elif defined (__arm__)
 #define __MHWORDSIZE   32
 #elif defined (__aarch64__) && defined ( __LP64__)
 #define __MHWORDSIZE   64
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] glibc: Make bits/wordsize.h multilibbed again

2018-08-09 Thread Daniel Díaz
As reported by ChenQi, leaving bits/wordsize.h out of being
multilibbed introduced a problem in building the SDK for
arm64:
  Error: Transaction check error:
file /usr/include/bits/wordsize.h conflicts between attempted installs of 
lib32-libc6-dev-2.27-r0.armv7vet2hf_vfp and libc6-dev-2.27-r0.aarch64

This effectively reverts commit a74c77d6.

Signed-off-by: Daniel Díaz 
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index a4f61f8..8ac01ce 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -136,7 +136,7 @@ do_install_append_armeb () {
 }
 
 do_install_armmultilib () {
-   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
+   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [rocko][PATCH] glibc: Avoid multilibbing on wordsize.h

2018-08-09 Thread Daniel Díaz
Hello!


On 26 July 2018 at 09:38, Daniel Díaz  wrote:
> Once another header #includes , there is a
> potential recursion going on because the
> multilib_header_wrapper.h #includes  again!
>
> This should not happen because an __arm__ (32-bits) or an
> __aarch64__ (64-bits) environment guarantees that we will
> be getting the correct definition, but when building against
> a different target (like BPF), recursion is what happens.
>
> This can be seen, for instance, when building eBPF programs
> from the kernel with `clang -target bpf', such as the ones
> located in linux/tools/testing/selftests/bpf/.
>
> (From OE-Core rev: a74c77d6168101e88c3a3bce7130f4f52cfab95d)
>
> Signed-off-by: Daniel Díaz 
> Signed-off-by: Aníbal Limón 
> Signed-off-by: Richard Purdie 
> ---
>  meta/recipes-core/glibc/glibc-package.inc | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-package.inc 
> b/meta/recipes-core/glibc/glibc-package.inc
> index b6d8074..c360dd9 100644
> --- a/meta/recipes-core/glibc/glibc-package.inc
> +++ b/meta/recipes-core/glibc/glibc-package.inc
> @@ -136,8 +136,7 @@ do_install_append_armeb () {
>  }
>
>  do_install_armmultilib () {
> -
> -   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
> bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
> +   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
> bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
> oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
> bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
> bits/setjmp.h
> oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h 
> bits/statfs.h bits/typesizes.h
>
> --
> 2.7.4


Please disregard this patch. An alternative will be posted shortly.

Greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] glibc: Avoid multilibbing on wordsize.h

2018-08-09 Thread Daniel Díaz
Hello!


On 30 July 2018 at 21:01, ChenQi  wrote:
> This patch causes a regression in multilib SDK for qemuarm64.
>
> Error: Transaction check error:
>   file /usr/include/bits/wordsize.h conflicts between attempted installs of
> lib32-libc6-dev-2.27-r0.armv7vet2hf_vfp and libc6-dev-2.27-r0.aarch64
>
> Please consider sending a follow-up patch to fix this regression.

Thanks for the heads up. Follow-up patches coming along.

Greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [sumo][PATCH] glibc: Avoid multilibbing on wordsize.h

2018-07-26 Thread Daniel Díaz
Once another header #includes , there is a
potential recursion going on because the
multilib_header_wrapper.h #includes  again!

This should not happen because an __arm__ (32-bits) or an
__aarch64__ (64-bits) environment guarantees that we will
be getting the correct definition, but when building against
a different target (like BPF), recursion is what happens.

This can be seen, for instance, when building eBPF programs
from the kernel with `clang -target bpf', such as the ones
located in linux/tools/testing/selftests/bpf/.

(From OE-Core rev: a74c77d6168101e88c3a3bce7130f4f52cfab95d)

Signed-off-by: Daniel Díaz 
Signed-off-by: Aníbal Limón 
Signed-off-by: Richard Purdie 
---
 meta/recipes-core/glibc/glibc-package.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 728bc53..35f5231 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -137,8 +137,7 @@ do_install_append_armeb () {
 }
 
 do_install_armmultilib () {
-
-   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
+   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [rocko][PATCH] glibc: Avoid multilibbing on wordsize.h

2018-07-26 Thread Daniel Díaz
Once another header #includes , there is a
potential recursion going on because the
multilib_header_wrapper.h #includes  again!

This should not happen because an __arm__ (32-bits) or an
__aarch64__ (64-bits) environment guarantees that we will
be getting the correct definition, but when building against
a different target (like BPF), recursion is what happens.

This can be seen, for instance, when building eBPF programs
from the kernel with `clang -target bpf', such as the ones
located in linux/tools/testing/selftests/bpf/.

(From OE-Core rev: a74c77d6168101e88c3a3bce7130f4f52cfab95d)

Signed-off-by: Daniel Díaz 
Signed-off-by: Aníbal Limón 
Signed-off-by: Richard Purdie 
---
 meta/recipes-core/glibc/glibc-package.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index b6d8074..c360dd9 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -136,8 +136,7 @@ do_install_append_armeb () {
 }
 
 do_install_armmultilib () {
-
-   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
+   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] glibc: Avoid multilibbing on wordsize.h

2018-07-25 Thread Daniel Díaz
Once another header #includes , there is a
potential recursion going on because the
multilib_header_wrapper.h #includes  again!

This should not happen because an __arm__ (32-bits) or an
__aarch64__ (64-bits) environment guarantees that we will
be getting the correct definition, but when building against
a different target (like BPF), recursion is what happens.

This can be seen, for instance, when building eBPF programs
from the kernel with `clang -target bpf', such as the ones
located in linux/tools/testing/selftests/bpf/.

Signed-off-by: Daniel Díaz 
Signed-off-by: Aníbal Limón 
---
 meta/recipes-core/glibc/glibc-package.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index ae3f2f6..a4f61f8 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -136,8 +136,7 @@ do_install_append_armeb () {
 }
 
 do_install_armmultilib () {
-
-   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
+   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][RFC] glibc: Avoid multilibbing on wordsize.h

2018-07-18 Thread Daniel Díaz
Once another header #includes , there is a
potential recursion going on because the
multilib_header_wrapper.h #includes  again!

This should not happen because an __arm__ (32-bits) or an
__aarch64__ (64-bits) environment guarantees that we will
be getting the correct definition, but when building against
a different target (like BPF), recursion is what happens.

This can be seen, for instance, when building eBPF programs
from the kernel with `clang -target bpf', such as the ones
located in linux/tools/testing/selftests/bpf/.

Signed-off-by: Daniel Díaz 
---
 meta/recipes-core/glibc/glibc-package.inc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index ae3f2f6..a4f61f8 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -136,8 +136,7 @@ do_install_append_armeb () {
 }
 
 do_install_armmultilib () {
-
-   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h bits/wordsize.h
+   oe_multilib_header bits/endian.h bits/fcntl.h bits/fenv.h 
bits/fp-fast.h bits/hwcap.h bits/ipc.h bits/link.h
oe_multilib_header bits/local_lim.h bits/mman.h bits/msq.h 
bits/pthreadtypes.h bits/pthreadtypes-arch.h  bits/sem.h  bits/semaphore.h 
bits/setjmp.h
oe_multilib_header bits/shm.h bits/sigstack.h bits/stat.h bits/statfs.h 
bits/typesizes.h
 
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kmscube: Update to master from 2018-06-17

2018-06-28 Thread Daniel Díaz
Changes from 0d8de4ce:
  c2d4ba8 drm-legacy: fix poll for flip event, actually exit on user input
  56c3917 formats: use weston's egl config matching logic, centralize format
  aac3788 Rework default modifier handling
  4f7cec0 Use weak functions to handle lack of gbm modifiers
  98f31bf cube-tex: make use of modifiers
  063ce5c gbm: fix fallback for drivers that don't support modifiers
  9dcce71 add MSAA

Also refresh gbm_bo_map/_unmap patch.

Signed-off-by: Daniel Díaz 
---
 .../detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch  | 10 +-
 meta/recipes-graphics/kmscube/kmscube_git.bb   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
 
b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
index 3605446..611e541 100644
--- 
a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
+++ 
b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
@@ -49,9 +49,9 @@ diff --git a/configure.ac b/configure.ac
 index 8397f7b..c7f1f4d 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -65,5 +65,8 @@ if test "x$enable_gbm_modifiers" = xyes; then
-   AC_DEFINE(HAVE_GBM_MODIFIERS, 1, [Define if you can use GBM 
properties.])
+@@ -49,5 +49,8 @@ if test "x$HAVE_GST" = "xyes"; then
  fi
+ AM_CONDITIONAL(ENABLE_GST, [test "x$HAVE_GST" = "xyes"])
  
 +AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], [])
 +AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"])
@@ -99,12 +99,12 @@ diff --git a/kmscube.c b/kmscube.c
 index 3a2c4dd..276dc55 100644
 --- a/kmscube.c
 +++ b/kmscube.c
-@@ -142,7 +142,11 @@ int main(int argc, char *argv[])
+@@ -148,7 +148,11 @@ int main(int argc, char *argv[])
else if (mode == VIDEO)
-   egl = init_cube_video(gbm, video);
+   egl = init_cube_video(gbm, video, samples);
else
 +#if HAVE_GBM_BO_MAP
-   egl = init_cube_tex(gbm, mode);
+   egl = init_cube_tex(gbm, mode, samples);
 +#else
 +  printf("gbm_bo_map() support missing\n");
 +#endif
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb 
b/meta/recipes-graphics/kmscube/kmscube_git.bb
index 5b64ed6..46aeeb0 100644
--- a/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -6,7 +6,7 @@ DEPENDS = "virtual/libgles2 virtual/egl libdrm gstreamer1.0 
gstreamer1.0-plugins
 
 LIC_FILES_CHKSUM = 
"file://kmscube.c;beginline=1;endline=23;md5=8b309d4ee67b7315ff7381270dd631fb"
 
-SRCREV = "0d8de4ce3a03f36af1817f9b0586d132ad2c5d2e"
+SRCREV = "9dcce71e603616ee7a54707e932f962cdf8fb20a"
 SRC_URI = 
"git://anongit.freedesktop.org/mesa/kmscube;branch=master;protocol=git \
 file://detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch"
 UPSTREAM_CHECK_COMMITS = "1"
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [morty][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-06-18 Thread Daniel Díaz
Hello!


On 11 June 2018 at 16:46, Andre McCurdy  wrote:
> On Mon, Jun 11, 2018 at 2:38 PM, akuster808  wrote:
>> On 06/11/2018 10:30 AM, Daniel Díaz wrote:
>>> Ping on this series for Morty.
>>
>> this is in the stable/morty-next branch which is on hold for the current
>> morty QA.
>> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=stable/pyro-next=76ffc6b7e5ff6f2bab6e53bb07f52a25fcb81ac9
>
> That's a link for stable/pyro-next.
> The change doesn't seem to be in stable/morty-next though:
>   http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=stable/morty-next

Is there anything from my side that needs to be done for this patch?

Thanks and greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [morty][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-06-11 Thread Daniel Díaz
On 16 May 2018 at 16:20, Daniel Díaz  wrote:
> On 6 April 2018 at 15:43, akuster808  wrote:
>> On 04/06/2018 10:08 AM, Daniel Díaz Rodríguez wrote:
>>> Ping on this series for Morty.
>> This needs to be ported to Pyro first. I do it this weekend and morty too.
> Ping on this series for Morty.

Ping on this series for Morty.

-- 
ddiaz
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v4] ltp: bump to release 20180515

2018-06-05 Thread Daniel Díaz
The following patches have made it to upstream:
* 0001-configure-Fix-default-value-of-without-numa-switch-i.patch
* 0001-configure-add-knob-to-control-numa-support.patch
* 0003-Add-knob-to-control-tirpc-support.patch
* 0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
* 0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch

These patches have been refreshed in order to apply cleanly
and without any fuzz:
* 0004-build-Add-option-to-select-libc-implementation.patch
* 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
* 0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
* 0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
* 0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch

This next patch was added to the set of patches that make LTP
build with musl:
* 0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch

Signed-off-by: Daniel Díaz 
---
v2: Actually change SRCREV, refresh/remove patches as needed.
v3: Patch diff with -M.
v4: Add patch for fs/read_all and musl.

 .../ltp/0001-Disable-rpc01-on-glibc-and-musl.patch | 29 
 ...ix-default-value-of-without-numa-switch-i.patch | 31 -
 ...onfigure-add-knob-to-control-numa-support.patch | 50 --
 .../0003-Add-knob-to-control-tirpc-support.patch   | 46 -
 ...-Add-option-to-select-libc-implementation.patch | 77 +-
 ...__GLIBC_PREREQ-is-defined-before-using-it.patch | 26 
 ...010-replace-__BEGIN_DECLS-and-__END_DECLS.patch | 75 -
 ..._GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch | 27 
 ...n.h-Use-sighandler_t-instead-of-__sighand.patch | 20 +++---
 ...etwork-nfsv4-acl-acl1.c-Security-fix-on-s.patch |  2 +-
 ...fine-FNM_EXTMATCH-if-not-already-like-und.patch | 44 +
 ...-make-is_fuse-return-zero-if-fs_type-is-N.patch | 40 ---
 .../ltp/{ltp_20180118.bb => ltp_20180515.bb}   |  9 +--
 13 files changed, 132 insertions(+), 344 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
 create mode 100644 
meta/recipes-extended/ltp/ltp/0040-read_all-Define-FNM_EXTMATCH-if-not-already-like-und.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
 rename meta/recipes-extended/ltp/{ltp_20180118.bb => ltp_20180515.bb} (91%)

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch 
b/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
deleted file mode 100644
index 78c6dfb..000
--- a/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ff39e6b69f0b26dad8ab685ee6116ff92bc363db Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Sat, 28 Apr 2018 00:08:55 -0700
-Subject: [PATCH] Disable rpc01 on glibc and musl
-
-It is not buildable with libtirpc
-
-Signed-off-by: Khem Raj 

-Upstream-Status: Pending
-
- testcases/network/rpc/basic_tests/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/testcases/network/rpc/basic_tests/Makefile 
b/testcases/network/rpc/basic_tests/Makefile
-index 66e9d5675..16a64e7da 100644
 a/testcases/network/rpc/basic_tests/Makefile
-+++ b/testcases/network/rpc/basic_tests/Makefile
-@@ -23,4 +23,7 @@
- top_srcdir?= ../../../..
- 
- include $(top_srcdir)/include/mk/env_pre.mk
-+
-+FILTER_OUT_DIRS += rpc01
-+
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
--- 
-2.17.0
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
 
b/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
deleted file mode 100644
index da62687..000
--- 
a/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4ace68a6ba501907a0741dba5f5f155e06a74c35 Mon Sep 17 00:00:00 2001
-From: Petr Vorel 
-Date: Wed, 7 Feb 2018 11:09:49 +0100
-Subject: [PATCH] configure: Fix default value of --without-numa switch in help
-
-The default value is no.
-
-Fixes: 39a85a1f1 ("configure: add knob to control numa support")
-
-Signed-off-by: Petr Vorel 
-Upstream-Status: Accepted

- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index b39a31d..d66ea00 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -86,7 +86,7 @@ fi
- # Numa
- AC_ARG_WITH([numa],
-   AC_HELP_STRING([--without-numa],
-- 

[OE-core] [PATCH v3] ltp: bump to release 20180515

2018-06-03 Thread Daniel Díaz
The following patches have made it to upstream:
* 0001-configure-Fix-default-value-of-without-numa-switch-i.patch
* 0001-configure-add-knob-to-control-numa-support.patch
* 0003-Add-knob-to-control-tirpc-support.patch
* 0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
* 0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch

These patches have been refreshed in order to apply cleanly
and without any fuzz:
* 0004-build-Add-option-to-select-libc-implementation.patch
* 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
* 0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
* 0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
* 0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch

Signed-off-by: Daniel Díaz 
---
v2: Actually change SRCREV, refresh/remove patches as needed.
v3: Patch diff with -M.

 .../ltp/0001-Disable-rpc01-on-glibc-and-musl.patch | 29 
 ...ix-default-value-of-without-numa-switch-i.patch | 31 -
 ...onfigure-add-knob-to-control-numa-support.patch | 50 --
 .../0003-Add-knob-to-control-tirpc-support.patch   | 46 -
 ...-Add-option-to-select-libc-implementation.patch | 77 +-
 ...__GLIBC_PREREQ-is-defined-before-using-it.patch | 26 
 ...010-replace-__BEGIN_DECLS-and-__END_DECLS.patch | 75 -
 ..._GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch | 27 
 ...n.h-Use-sighandler_t-instead-of-__sighand.patch | 20 +++---
 ...etwork-nfsv4-acl-acl1.c-Security-fix-on-s.patch |  2 +-
 ...-make-is_fuse-return-zero-if-fs_type-is-N.patch | 40 ---
 .../ltp/{ltp_20180118.bb => ltp_20180515.bb}   |  8 +--
 12 files changed, 87 insertions(+), 344 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
 rename meta/recipes-extended/ltp/{ltp_20180118.bb => ltp_20180515.bb} (91%)

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch 
b/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
deleted file mode 100644
index 78c6dfb..000
--- a/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ff39e6b69f0b26dad8ab685ee6116ff92bc363db Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Sat, 28 Apr 2018 00:08:55 -0700
-Subject: [PATCH] Disable rpc01 on glibc and musl
-
-It is not buildable with libtirpc
-
-Signed-off-by: Khem Raj 

-Upstream-Status: Pending
-
- testcases/network/rpc/basic_tests/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/testcases/network/rpc/basic_tests/Makefile 
b/testcases/network/rpc/basic_tests/Makefile
-index 66e9d5675..16a64e7da 100644
 a/testcases/network/rpc/basic_tests/Makefile
-+++ b/testcases/network/rpc/basic_tests/Makefile
-@@ -23,4 +23,7 @@
- top_srcdir?= ../../../..
- 
- include $(top_srcdir)/include/mk/env_pre.mk
-+
-+FILTER_OUT_DIRS += rpc01
-+
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
--- 
-2.17.0
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
 
b/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
deleted file mode 100644
index da62687..000
--- 
a/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4ace68a6ba501907a0741dba5f5f155e06a74c35 Mon Sep 17 00:00:00 2001
-From: Petr Vorel 
-Date: Wed, 7 Feb 2018 11:09:49 +0100
-Subject: [PATCH] configure: Fix default value of --without-numa switch in help
-
-The default value is no.
-
-Fixes: 39a85a1f1 ("configure: add knob to control numa support")
-
-Signed-off-by: Petr Vorel 
-Upstream-Status: Accepted

- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index b39a31d..d66ea00 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -86,7 +86,7 @@ fi
- # Numa
- AC_ARG_WITH([numa],
-   AC_HELP_STRING([--without-numa],
--[without numa support (default=yes)]),
-+[without numa support (default=no)]),
-   [with_numa=no],
-   [with_numa=yes]
- )
--- 
-2.7.4
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
 
b/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
deleted file mode 100644
index 8aaa287..000

[OE-core] [PATCH v2] ltp: bump to release 20180515

2018-05-31 Thread Daniel Díaz
The following patches have made it to upstream:
* 0001-configure-Fix-default-value-of-without-numa-switch-i.patch
* 0001-configure-add-knob-to-control-numa-support.patch
* 0003-Add-knob-to-control-tirpc-support.patch
* 0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
* 0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch

These patches have been refreshed in order to apply cleanly
and without any fuzz:
* 0004-build-Add-option-to-select-libc-implementation.patch
* 0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
* 0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
* 0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
* 0036-testcases-network-nfsv4-acl-acl1.c-Security-fix-on-s.patch

Signed-off-by: Daniel Díaz 
---
v2: Actually change SRCREV, refresh/remove patches as needed.

 .../ltp/0001-Disable-rpc01-on-glibc-and-musl.patch |  29 -
 ...ix-default-value-of-without-numa-switch-i.patch |  31 --
 ...onfigure-add-knob-to-control-numa-support.patch |  50 -
 .../0003-Add-knob-to-control-tirpc-support.patch   |  46 
 ...-Add-option-to-select-libc-implementation.patch |  77 --
 ...__GLIBC_PREREQ-is-defined-before-using-it.patch |  26 ++---
 ...010-replace-__BEGIN_DECLS-and-__END_DECLS.patch |  75 -
 ..._GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch |  27 ++---
 ...n.h-Use-sighandler_t-instead-of-__sighand.patch |  20 ++--
 ...etwork-nfsv4-acl-acl1.c-Security-fix-on-s.patch |   2 +-
 ...-make-is_fuse-return-zero-if-fs_type-is-N.patch |  40 ---
 meta/recipes-extended/ltp/ltp_20180118.bb  | 117 -
 meta/recipes-extended/ltp/ltp_20180515.bb  | 111 +++
 13 files changed, 197 insertions(+), 454 deletions(-)
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0040-safe_macros-make-is_fuse-return-zero-if-fs_type-is-N.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp_20180118.bb
 create mode 100644 meta/recipes-extended/ltp/ltp_20180515.bb

diff --git 
a/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch 
b/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
deleted file mode 100644
index 78c6dfb..000
--- a/meta/recipes-extended/ltp/ltp/0001-Disable-rpc01-on-glibc-and-musl.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ff39e6b69f0b26dad8ab685ee6116ff92bc363db Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Sat, 28 Apr 2018 00:08:55 -0700
-Subject: [PATCH] Disable rpc01 on glibc and musl
-
-It is not buildable with libtirpc
-
-Signed-off-by: Khem Raj 

-Upstream-Status: Pending
-
- testcases/network/rpc/basic_tests/Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/testcases/network/rpc/basic_tests/Makefile 
b/testcases/network/rpc/basic_tests/Makefile
-index 66e9d5675..16a64e7da 100644
 a/testcases/network/rpc/basic_tests/Makefile
-+++ b/testcases/network/rpc/basic_tests/Makefile
-@@ -23,4 +23,7 @@
- top_srcdir?= ../../../..
- 
- include $(top_srcdir)/include/mk/env_pre.mk
-+
-+FILTER_OUT_DIRS += rpc01
-+
- include $(top_srcdir)/include/mk/generic_trunk_target.mk
--- 
-2.17.0
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
 
b/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
deleted file mode 100644
index da62687..000
--- 
a/meta/recipes-extended/ltp/ltp/0001-configure-Fix-default-value-of-without-numa-switch-i.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4ace68a6ba501907a0741dba5f5f155e06a74c35 Mon Sep 17 00:00:00 2001
-From: Petr Vorel 
-Date: Wed, 7 Feb 2018 11:09:49 +0100
-Subject: [PATCH] configure: Fix default value of --without-numa switch in help
-
-The default value is no.
-
-Fixes: 39a85a1f1 ("configure: add knob to control numa support")
-
-Signed-off-by: Petr Vorel 
-Upstream-Status: Accepted

- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index b39a31d..d66ea00 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -86,7 +86,7 @@ fi
- # Numa
- AC_ARG_WITH([numa],
-   AC_HELP_STRING([--without-numa],
--[without numa support (default=yes)]),
-+[without numa support (default=no)]),
-   [with_numa=no],
-   [with_numa=yes]
- )
--- 
-2.7.4
-
diff --git 
a/meta/recipes-extended/ltp/ltp/0001-configure-add-knob-to-control-numa-support.patch
 
b/meta/recipes-extended/ltp/ltp/0001-configur

Re: [OE-core] [PATCH] ltp: bump to release 20180515

2018-05-25 Thread Daniel Díaz
Hello!


On 25 May 2018 at 00:25, Martin Jansa <martin.ja...@gmail.com> wrote:
> I think it means that he didn't test it very well, because just renaming
> the file without updating SRCREV didn't bump anything and the old
> patches still apply cleanly.

Thanks for pointing that out! I was thrilled that updating PV and
building and having all tests passing as it did before went smoothly.
No wonder.

Will follow up with v2.

Greetings!

Daniel Díaz
daniel.d...@linaro.org
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] ltp: bump to release 20180515

2018-05-24 Thread Daniel Díaz
Patches are still fresh as the meadows.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-extended/ltp/{ltp_20180118.bb => ltp_20180515.bb} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename meta/recipes-extended/ltp/{ltp_20180118.bb => ltp_20180515.bb} (100%)

diff --git a/meta/recipes-extended/ltp/ltp_20180118.bb 
b/meta/recipes-extended/ltp/ltp_20180515.bb
similarity index 100%
rename from meta/recipes-extended/ltp/ltp_20180118.bb
rename to meta/recipes-extended/ltp/ltp_20180515.bb
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [morty][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-05-16 Thread Daniel Díaz
On 6 April 2018 at 15:43, akuster808 <akuster...@gmail.com> wrote:
> On 04/06/2018 10:08 AM, Daniel Díaz Rodríguez wrote:
>> Ping on this series for Morty.
> This needs to be ported to Pyro first. I do it this weekend and morty too.

Ping on this series for Morty.

-- 
ddiaz
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH 2/2 v2] gdb: fix header ordering for TRAP_HWBKPT

2018-04-12 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

(From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e)

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
v2: Add signed-off-by to patch.

 meta/recipes-devtools/gdb/gdb-7.12.1.inc   |  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 53 ++
 2 files changed, 54 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-7.12.1.inc 
b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
index 634756c..1d81185 100644
--- a/meta/recipes-devtools/gdb/gdb-7.12.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch 
\
+   file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b"
 SRC_URI[sha256sum] = 
"4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186"
diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..9bf99f6
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,53 @@
+From 49bd068c3acf376a3018c0ebd849bf7f72a1874d Mon Sep 17 00:00:00 2001
+From: James Clarke <jrt...@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3447e07..dd3310e 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #include 
+ 
+ /* Stores the ptrace options supported by the running kernel.
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH 1/2 v2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-04-12 Thread Daniel Díaz
From: Fathi Boudra <fathi.bou...@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.bou...@linaro.org>
Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@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

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 000..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 <pan...@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 <pan...@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 ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-04-10 Thread Daniel Díaz
From: Fathi Boudra <fathi.bou...@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.bou...@linaro.org>
Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
 ...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 000..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 <pan...@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 <pan...@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 ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH 2/2] gdb: fix header ordering for TRAP_HWBKPT

2018-04-10 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

(From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e)

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
 meta/recipes-devtools/gdb/gdb-7.12.1.inc   |  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 51 ++
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-7.12.1.inc 
b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
index 634756c..1d81185 100644
--- a/meta/recipes-devtools/gdb/gdb-7.12.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.12.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch 
\
+   file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b"
 SRC_URI[sha256sum] = 
"4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186"
diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..cbcc65a
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,51 @@
+From 49bd068c3acf376a3018c0ebd849bf7f72a1874d Mon Sep 17 00:00:00 2001
+From: James Clarke <jrt...@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3447e07..dd3310e 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #include 
+ 
+ /* Stores the ptrace options supported by the running kernel.
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [morty][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-04-06 Thread Daniel Díaz Rodríguez
Ping on this series for Morty.

-- 
ddiaz


On 13 March 2018 at 11:17, Daniel Díaz <daniel.d...@linaro.org> wrote:
> From: Fathi Boudra <fathi.bou...@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.bou...@linaro.org>
> Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
> Signed-off-by: Ross Burton <ross.bur...@intel.com>
> ---
>  ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 69 
> ++
>  meta/recipes-core/glibc/glibc_2.24.bb  |  1 +
>  2 files changed, 70 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 000..fe22cc3
> --- /dev/null
> +++ 
> b/meta/recipes-core/glibc/glibc/0029-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.pan...@redhat.com>
> +From: Pratyush Anand <pan...@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 <pan...@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.24.bb 
> b/meta/recipes-core/glibc/glibc_2.24.bb
> index 6ea4585..09694f2 100644
> --- a/meta/recipes-core/glibc/glibc_2.24.bb
> +++ b/meta/recipes-core/glibc/glibc_2.24.bb
> @@ -38,6 +38,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
> file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
> file://0026-build_local_scope.patch \
> file://0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch \
> +   

[OE-core] [morty][PATCH 2/2] gdb: fix header ordering for TRAP_HWBKPT

2018-03-13 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

(From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e)

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
 meta/recipes-devtools/gdb/gdb-7.11.1.inc   |  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 56 ++
 2 files changed, 57 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-7.11.1.inc 
b/meta/recipes-devtools/gdb/gdb-7.11.1.inc
index d9dfe6f..c8ead51 100644
--- a/meta/recipes-devtools/gdb/gdb-7.11.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.11.1.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://0011-avx_mpx.patch \
+   
file://0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 
 SRC_URI[md5sum] = "5aa71522e488e358243917967db87476"
diff --git 
a/meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..1fcd355
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,56 @@
+From e8e11841f55521dc7dbfdd3530a5a0ff7ccbfc7e Mon Sep 17 00:00:00 2001
+From: James Clarke <jrt...@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 0eaf9a3..446d5ba 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ 
+ /* Stores the ptrace options supported by the running kernel.
+A value of -1 means we did not check for features yet.  A value
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 0a23bcb..d84114b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [morty][PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-03-13 Thread Daniel Díaz
From: Fathi Boudra <fathi.bou...@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.bou...@linaro.org>
Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
 ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 69 ++
 meta/recipes-core/glibc/glibc_2.24.bb  |  1 +
 2 files changed, 70 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 000..fe22cc3
--- /dev/null
+++ 
b/meta/recipes-core/glibc/glibc/0029-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.pan...@redhat.com>
+From: Pratyush Anand <pan...@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 <pan...@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.24.bb 
b/meta/recipes-core/glibc/glibc_2.24.bb
index 6ea4585..09694f2 100644
--- a/meta/recipes-core/glibc/glibc_2.24.bb
+++ b/meta/recipes-core/glibc/glibc_2.24.bb
@@ -38,6 +38,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \
file://0026-build_local_scope.patch \
file://0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch \
+   
file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \
file://CVE-2016-6323.patch \
file://0001-Add-atomic_exchange_relaxed.patch \

file://0002-Add-atomic-operations-required-by-the-new-condition-.patch \
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [rocko] [PATCH 2/2] gdb: fix header ordering for TRAP_HWBKPT

2018-03-13 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

(From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e)

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
 meta/recipes-devtools/gdb/gdb-8.0.inc  |  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 56 ++
 2 files changed, 57 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-8.0.inc 
b/meta/recipes-devtools/gdb/gdb-8.0.inc
index fba32ce..227abd9 100644
--- a/meta/recipes-devtools/gdb/gdb-8.0.inc
+++ b/meta/recipes-devtools/gdb/gdb-8.0.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0009-Change-order-of-CFLAGS.patch \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch 
\
+   file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 SRC_URI[md5sum] = "c3d35cd949084be53b92cc1e03485f88"
 SRC_URI[sha256sum] = 
"f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee"
diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..ef97de7
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,56 @@
+From b033a9663053eed87cb572397176747b88e9a699 Mon Sep 17 00:00:00 2001
+From: James Clarke <jrt...@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3265b16..559c2de 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #ifdef HAVE_SYS_PROCFS_H
+ #include 
+ #endif
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [rocko] [PATCH 1/2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-03-13 Thread Daniel Díaz
From: Fathi Boudra <fathi.bou...@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.bou...@linaro.org>
Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
Signed-off-by: Ross Burton <ross.bur...@intel.com>
---
 ...o-consts.h-enum-definition-for-TRAP_HWBKP.patch | 69 ++
 meta/recipes-core/glibc/glibc_2.26.bb  |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 
meta/recipes-core/glibc/glibc/0029-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch

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 000..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.pan...@redhat.com>
+From: Pratyush Anand <pan...@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 <pan...@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 ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gdb: Add signed-off-by tag to patch

2018-03-06 Thread Daniel Díaz
A patch went in (in 4aaf747) without a proper signed-off-by
because the project (in its upstream repository) does not use
Git.

This will take care of that before spreading the patch to
other branches.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 .../gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch   | 5 +
 1 file changed, 5 insertions(+)

diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
index c7b1d0d..ef97de7 100644
--- 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -3,6 +3,9 @@ From: James Clarke <jrt...@jrtc27.com>
 Date: Fri, 19 Jan 2018 17:22:49 +
 Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
  gdb_wait.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
 contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
@@ -16,6 +19,8 @@ gdb/ChangeLog:
* nat/linux-ptrace.h: ... to here.
 
 Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
 ---
  gdb/nat/linux-ptrace.c | 2 --
  gdb/nat/linux-ptrace.h | 1 +
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] gdb: fix header ordering for TRAP_HWBKPT

2018-03-06 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: Add signed-off-by tag to patch

 meta/recipes-devtools/gdb/gdb-8.0.1.inc|  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 56 ++
 2 files changed, 57 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-8.0.1.inc 
b/meta/recipes-devtools/gdb/gdb-8.0.1.inc
index 83c08e5..4a5299b 100644
--- a/meta/recipes-devtools/gdb/gdb-8.0.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-8.0.1.inc
@@ -17,6 +17,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch 
\
file://0012-Unbreak-GDBserver-build-for-x32.patch \
+   file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac"
 SRC_URI[sha256sum] = 
"3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3"
diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..2cdeafc
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,56 @@
+From c57122f94b1c749e4c12f6449b61a3b114f705cd Mon Sep 17 00:00:00 2001
+From: James Clarke <jrt...@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3265b16..559c2de 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #ifdef HAVE_SYS_PROCFS_H
+ #include 
+ #endif
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gdb: fix header ordering for TRAP_HWBKPT

2018-03-02 Thread Daniel Díaz
This error can appear in gdb/nat/linux-ptrace.c because of
the order in which some headers are processed:
| In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0:
| ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier 
before numeric constant
|  # define TRAP_HWBKPT 4
|   ^
| Makefile:2357: recipe for target 'linux-ptrace.o' failed
| make[2]: *** [linux-ptrace.o] Error 1
| make[2]: *** Waiting for unfinished jobs
| make[2]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb'
| Makefile:8822: recipe for target 'all-gdb' failed
| make[1]: *** [all-gdb] Error 2
| make[1]: Leaving directory 
'/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux'
| Makefile:846: recipe for target 'all' failed
| make: *** [all] Error 2

A patch from GDB's current master solves the issue.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-devtools/gdb/gdb-8.0.1.inc|  1 +
 ...4-defining-TRAP_HWBKPT-before-including-g.patch | 51 ++
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch

diff --git a/meta/recipes-devtools/gdb/gdb-8.0.1.inc 
b/meta/recipes-devtools/gdb/gdb-8.0.1.inc
index 83c08e5..4a5299b 100644
--- a/meta/recipes-devtools/gdb/gdb-8.0.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-8.0.1.inc
@@ -17,6 +17,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0010-resolve-restrict-keyword-conflict.patch \
file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch 
\
file://0012-Unbreak-GDBserver-build-for-x32.patch \
+   file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \
 "
 SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac"
 SRC_URI[sha256sum] = 
"3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3"
diff --git 
a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
new file mode 100644
index 000..c7b1d0d
--- /dev/null
+++ 
b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch
@@ -0,0 +1,51 @@
+From b033a9663053eed87cb572397176747b88e9a699 Mon Sep 17 00:00:00 2001
+From: James Clarke <jrt...@jrtc27.com>
+Date: Fri, 19 Jan 2018 17:22:49 +
+Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
+ gdb_wait.h
+
+On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
+contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
+define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
+earlier; include it from linux-ptrace.h so it can never come afterwards.
+
+gdb/ChangeLog:
+
+   * nat/linux-ptrace.c: Remove unnecessary reinclusion of
+   gdb_ptrace.h, and move including gdb_wait.h ...
+   * nat/linux-ptrace.h: ... to here.
+
+Upstream-Status: Accepted 
[https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
+---
+ gdb/nat/linux-ptrace.c | 2 --
+ gdb/nat/linux-ptrace.h | 1 +
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index 3265b16..559c2de 100644
+--- a/gdb/nat/linux-ptrace.c
 b/gdb/nat/linux-ptrace.c
+@@ -21,8 +21,6 @@
+ #include "linux-procfs.h"
+ #include "linux-waitpid.h"
+ #include "buffer.h"
+-#include "gdb_wait.h"
+-#include "gdb_ptrace.h"
+ #ifdef HAVE_SYS_PROCFS_H
+ #include 
+ #endif
+diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
+index 5954945..6faa89b 100644
+--- a/gdb/nat/linux-ptrace.h
 b/gdb/nat/linux-ptrace.h
+@@ -21,6 +21,7 @@
+ struct buffer;
+ 
+ #include "nat/gdb_ptrace.h"
++#include "gdb_wait.h"
+ 
+ #ifdef __UCLIBC__
+ #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
+-- 
+2.7.4
+
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions

2018-03-02 Thread Daniel Díaz
From: Fathi Boudra <fathi.bou...@linaro.org>

Patch submitted upstream, pending to be merged:
https://sourceware.org/bugzilla/show_bug.cgi?id=21286

Signed-off-by: Fathi Boudra <fathi.bou...@linaro.org>
Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: Refresh to glibc 2.27

 ...o-consts.h-enum-definition-for-TRAP_HWBKP.patch | 69 ++
 meta/recipes-core/glibc/glibc_2.27.bb  |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 
meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch

diff --git 
a/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
 
b/meta/recipes-core/glibc/glibc/0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch
new file mode 100644
index 000..436c847
--- /dev/null
+++ 
b/meta/recipes-core/glibc/glibc/0028-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.pan...@redhat.com>
+From: Pratyush Anand <pan...@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 <pan...@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.27.bb 
b/meta/recipes-core/glibc/glibc_2.27.bb
index bcc1acf..c4042d1 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.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://0026-reset-dl_load_write_lock-after-forking.patch \

file://0027-Acquire-ld.so-lock-before-switching-to-malloc_atfork.patch \
+   
file://0028-bits-siginfo-consts.h-enum-definition-for-TRAP_HWBKP.patch \
 "
 
 NATIVESDKFIXES ?= ""
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kmscube: Add patch for missing GBM function

2018-03-02 Thread Daniel Díaz
Some implementations of GBM, like the one included with
libMali, do not have gbm_bo_map() nor gbm_bo_unmap().
This patch enables kmscube to work with those implementations
even if it doesn't work as great.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 ...-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch | 116 +
 meta/recipes-graphics/kmscube/kmscube_git.bb   |   3 +-
 2 files changed, 118 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch

diff --git 
a/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
 
b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
new file mode 100644
index 000..3605446
--- /dev/null
+++ 
b/meta/recipes-graphics/kmscube/kmscube/detect-gst_bo_map-_unmap-and-use-it-or-avoid-it.patch
@@ -0,0 +1,116 @@
+From 761bf993ca55095f46380c0238583791c1797295 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Tue, 11 Jul 2017 14:50:37 -0500
+Subject: [PATCH kmscube] Detect gst_bo_map/_unmap and use it (or avoid it)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Those functions are not available on libMali, thus breaking
+builds and creating havoc.
+
+Removing the specific parts of the code that deal with
+gbm_bo_map() and gbm_bo_unmap() renders the kmscube utility
+a little less useful, but still valuable.
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+Cc: Rob Clark <robdcl...@gmail.com>
+Reviewed-by: Eric Engestrom <eric.engest...@imgtec.com>
+
+Upstream-Status: Submitted 
[https://lists.freedesktop.org/archives/mesa-dev/2017-July/163020.html]
+---
+ Makefile.am   | 5 -
+ configure.ac  | 3 +++
+ gst-decoder.c | 7 ++-
+ kmscube.c | 4 
+ 4 files changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a36087d..ab4adbf 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -43,7 +43,6 @@ kmscube_SOURCES = \
+   common.c \
+   common.h \
+   cube-smooth.c \
+-  cube-tex.c \
+   drm-atomic.c \
+   drm-common.c \
+   drm-common.h \
+@@ -59,3 +58,7 @@ kmscube_LDADD += $(GST_LIBS)
+ kmscube_CFLAGS += $(GST_CFLAGS)
+ kmscube_SOURCES += cube-video.c gst-decoder.c
+ endif
++
++if ENABLE_GBM_MAP
++kmscube_SOURCES += cube-tex.c
++endif
+diff --git a/configure.ac b/configure.ac
+index 8397f7b..c7f1f4d 100644
+--- a/configure.ac
 b/configure.ac
+@@ -65,5 +65,8 @@ if test "x$enable_gbm_modifiers" = xyes; then
+   AC_DEFINE(HAVE_GBM_MODIFIERS, 1, [Define if you can use GBM 
properties.])
+ fi
+ 
++AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], [])
++AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"])
++
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
+diff --git a/gst-decoder.c b/gst-decoder.c
+index 2d6d581..b84980e 100644
+--- a/gst-decoder.c
 b/gst-decoder.c
+@@ -332,6 +332,7 @@ set_last_frame(struct decoder *dec, EGLImage frame, 
GstSample *samp)
+   dec->last_samp = samp;
+ }
+ 
++#if HAVE_GBM_BO_MAP
+ // TODO this could probably be a helper re-used by cube-tex:
+ static int
+ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+@@ -357,6 +358,7 @@ buf_to_fd(const struct gbm *gbm, int size, void *ptr)
+ 
+   return fd;
+ }
++#endif
+ 
+ static EGLImage
+ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+@@ -410,12 +412,15 @@ buffer_to_image(struct decoder *dec, GstBuffer *buf)
+ 
+   if (is_dmabuf_mem) {
+   dmabuf_fd = dup(gst_dmabuf_memory_get_fd(mem));
+-  } else {
++  }
++#if HAVE_GBM_BO_MAP
++  else {
+   GstMapInfo map_info;
+   gst_buffer_map(buf, _info, GST_MAP_READ);
+   dmabuf_fd = buf_to_fd(dec->gbm, map_info.size, map_info.data);
+   gst_buffer_unmap(buf, _info);
+   }
++#endif
+ 
+   if (dmabuf_fd < 0) {
+   GST_ERROR("could not obtain DMABUF FD");
+diff --git a/kmscube.c b/kmscube.c
+index 3a2c4dd..276dc55 100644
+--- a/kmscube.c
 b/kmscube.c
+@@ -142,7 +142,11 @@ int main(int argc, char *argv[])
+   else if (mode == VIDEO)
+   egl = init_cube_video(gbm, video);
+   else
++#if HAVE_GBM_BO_MAP
+   egl = init_cube_tex(gbm, mode);
++#else
++  printf("gbm_bo_map() support missing\n");
++#endif
+ 
+   if (!egl) {
+   printf("failed to initialize EGL\n");
+-- 
+2.7.4
+
diff --git a/meta/recipes-graphics/kmscube/kmscube_git.bb 
b/meta/recipes-graphics/kmscube/kmscube_git.bb
index 4265f8a..5b64ed6 100644
--- a/meta/recipes-graphics/kmscube/kmscube_git.bb
+++ b/meta/recipes-graphics/kmscube/kmscube_git.bb
@@ -7,7 +7,8 @@ DEPENDS = "virtual/libgles2 virtual/egl libdrm gstreamer1.0 
gstreamer1.0-plugins
 LIC_

[OE-core] [PATCH 3/3] insane: add support for ARM64 ILP32

2017-11-13 Thread Daniel Díaz
Add aarch64 32-bits (ILP32) ELF header into dictionary and
check binaries for 32-bitness.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/classes/insane.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index def9c70..fc9395c 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -146,6 +146,9 @@ def package_qa_get_machine_dict(d):
 "powerpc":(20, 0,0,  False,
 32),
 "sh4":(42, 0,0,  True, 
 32),
   },
+"linux-gnu_ilp32" : {
+"aarch64" :   (183,0,0,  True, 
 32),
+  },
 "linux-gnux32" :   {
 "x86_64": (62, 0,0,  True, 
 32),
   },
@@ -426,7 +429,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
 
 # Check the architecture and endiannes of the binary
 is_32 = (("virtual/kernel" in provides) or 
bb.data.inherits_class("module", d)) and \
-(target_os == "linux-gnux32" or target_os == "linux-muslx32"  or 
re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+(target_os == "linux-gnux32" or target_os == "linux-muslx32" or 
target_os == "linux-gnu_ilp32" or re.match('mips64.*32', 
d.getVar('DEFAULTTUNE')))
 if not ((machine == elf.machine()) or is_32):
 package_qa_add_message(messages, "arch", "Architecture did not match 
(%s, expected %s) on %s" % \
  (oe.qa.elf_machine_to_string(elf.machine()), 
oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3] siteinfo: add support for ARM64 ILP32

2017-11-13 Thread Daniel Díaz
More information about ARM64 ILP32 can be found here:
* https://wiki.debian.org/Arm64ilp32Port
* https://wiki.linaro.org/Platform/arm64-ilp32

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/classes/siteinfo.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index 29cd2aa..7f7af36 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -60,6 +60,7 @@ def siteinfo_data(d):
 "darwin9": "common-darwin",
 "linux": "common-linux common-glibc",
 "linux-gnu": "common-linux common-glibc",
+"linux-gnu_ilp32": "common-linux common-glibc",
 "linux-gnux32": "common-linux common-glibc",
 "linux-gnun32": "common-linux common-glibc",
 "linux-gnueabi": "common-linux common-glibc",
@@ -75,6 +76,8 @@ def siteinfo_data(d):
 targetinfo = {
 "aarch64-linux-gnu": "aarch64-linux",
 "aarch64_be-linux-gnu": "aarch64_be-linux",
+"aarch64-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
+"aarch64_be-linux-gnu_ilp32": "bit-32 aarch64_be-linux arm-32",
 "aarch64-linux-musl": "aarch64-linux",
 "aarch64_be-linux-musl": "aarch64_be-linux",
 "arm-linux-gnueabi": "arm-linux",
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] cross-canadian: update GNU name for ILP32 triplet

2017-11-13 Thread Daniel Díaz
As discussed and agreed in Linaro Connect Budapest 2017 [1],
the GNU name for ARM64 with 32-bit ABI has been changed, e.g.,
from:
  aarch64_ilp32-linux-gnu
to:
  aarch64-linux-gnu_ilp32

The current code has "ilp32" as an OS variant; this change
updates that variant to include the underscore in order to
match the agreed convention.

More information about ARM64 ILP32 can be found here:
* https://wiki.debian.org/Arm64ilp32Port
* https://wiki.linaro.org/Platform/arm64-ilp32

[1] https://lists.linaro.org/pipermail/cross-distro/2017-March/000864.html

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/classes/cross-canadian.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/cross-canadian.bbclass 
b/meta/classes/cross-canadian.bbclass
index 1928455..cce09c9 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -38,7 +38,7 @@ python () {
 extralibcs = [""]
 if "musl" in d.getVar("BASECANADIANEXTRAOS"):
 extralibcs.append("musl")
-for variant in ["", "spe", "x32", "eabi", "n32", "ilp32"]:
+for variant in ["", "spe", "x32", "eabi", "n32", "_ilp32"]:
 for libc in extralibcs:
 entry = "linux"
 if variant and libc:
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] perl: Undefine d_libm_lib_version.

2017-10-10 Thread Daniel Díaz
A recent commit in GLIBC [1] got rid of _LIB_VERSION, which
makes Perl's build fail:
| pp.c:47:5: error: unknown type name '_LIB_VERSION_TYPE'; did you mean 
'__VERSION__'?
|  _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
|  ^
|  __VERSION__
| pp.c:47:38: error: '_IEEE_' undeclared here (not in a function); did you mean 
'_SIZET_'?
|  _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
|   ^~
|   _SIZET_
| make[1]: *** [pp.o] Error 1

The current config.sh enables d_libm_lib_version for
everyone, with special cases left to undefine it as fixup
(such as MUSL [2]).

Since this may only affect some BSDs and Cygwin [3], it
follows that the opposite (defining it) should be a fixup
for those special cases.

[1] 
https://sourceware.org/git/?p=glibc.git;a=commit;h=813378e9fe17e029caf627cab76fe23eb46815fa
[2] 
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/perl/perl_5.24.1.bb?id=8ca61a5464743ff85b6d26886112750d6ddd13e0#n127
[3] 
https://perl5.git.perl.org/perl.git/blob/443bd156a6baaf7a8fe6b6b05fcf6c4178140ed2:/pp.c#l42

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-devtools/perl/perl/config.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/perl/perl/config.sh 
b/meta/recipes-devtools/perl/perl/config.sh
index 4657673..ac0484c 100644
--- a/meta/recipes-devtools/perl/perl/config.sh
+++ b/meta/recipes-devtools/perl/perl/config.sh
@@ -361,7 +361,7 @@ d_ldbl_dig='define'
 d_ldexpl='define'
 d_lgamma='define'
 d_lgamma_r='define'
-d_libm_lib_version='define'
+d_libm_lib_version='undef'
 d_libname_unique='undef'
 d_link='define'
 d_llrint='define'
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/3 v2][pyro] piglit: add patch for lack of gbm_bo_map

2017-06-07 Thread Daniel Díaz
[Backported from master.]

[Piglit Bug #100978] -- https://bugs.freedesktop.org/show_bug.cgi?id=100978

When linking against Mali 450 r6, errors like the following
can be seen:
  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
  collect2: error: ld returned 1 exit status
  make[2]: *** [bin/point-sprite] Error 1

This is due to gbm_bo_map() and gbm_bo_unmap() being recently
added but not yet implemented by all graphics drivers.

Instead of relying on GBM's version, actually try to link
against those symbols.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: Embed upstream status into patch; add patch into recipe.

 ...fine-GBM_BO_MAP-only-when-symbol-is-found.patch | 51 ++
 meta/recipes-graphics/piglit/piglit_git.bb |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch

diff --git 
a/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
 
b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
new file mode 100644
index 000..8b63424
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
@@ -0,0 +1,51 @@
+From 47697aee05a112422acf203982085e7b3e6c05b2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Thu, 4 May 2017 00:57:39 -0500
+Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gbm_bo_map() and _unmap() have been added recently to Mesa,
+and this update may not have reached all implementations of
+GBM, such as the one provided by Mali r6, where said
+definitions can be found in the header file but not in the
+library itself. This leads to errors like the following when
+linking:
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
+  collect2: error: ld returned 1 exit status
+  make[2]: *** [bin/point-sprite] Error 1
+
+Instead of relying on the header file, actually try to link
+using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP
+should be defined.
+
+Upstream-Status: Submitted [pig...@lists.freedesktop.org]
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+Reviewed-by: Jan Vesely <jan.ves...@rutgers.edu>
+Reviewed-by: Dylan Baker <dy...@pnwbakers.com>
+---
+ CMakeLists.txt | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4ff99e..cc26fa8 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+   if(GBM_FOUND)
+   set(PIGLIT_HAS_GBM True)
+   add_definitions(-DPIGLIT_HAS_GBM)
+-  if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION 
VERSION_GREATER "12.1")
+-  set(PIGLIT_HAS_GBM_BO_MAP True)
++  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} 
${GBM_LIBRARIES})
++  CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
++  if (PIGLIT_HAS_GBM_BO_MAP)
+   add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
+   endif()
+   endif(GBM_FOUND)
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index eae3eed..19db86c 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
 SRC_URI = "git://anongit.freedesktop.org/piglit \
file://0001-cmake-install-bash-completions-in-the-right-place.patch 
\
file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch 
\
+   file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch 
\
"
 
 # From 2017-02-06
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3 v2][pyro] piglit: add patches for unbuildable surfaceless Mesa test

2017-06-07 Thread Daniel Díaz
[Backported from master.]

Some EGL implementations do not actually ship all Khronos-
extensions. As it turns out, the Mali 450 driver does not
include any of the following symbols, used by the
egl_mesa_platform_surfaceless.c spec test:
* eglGetPlatformDisplay
* eglCreatePlatformPixmapSurface
* eglCreatePlatformWindowSurface

The Right Thing To Do was to obtain the implementation of
these functions (via eglGetProcAddress), as is provided
by their EXT counterparts. These are guaranteed to exist
since they are required by EGL_EXT_platform_base.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: Embed upstream status into patches; add patch into recipe.

 ...nour-Surfaceless-MESA-in-get_default_disp.patch | 54 +++
 ...atform_surfaceless-Don-t-use-eglGetPlatfo.patch | 36 ++
 ...atform_surfaceless-Use-EXT-functions-for-.patch | 78 ++
 meta/recipes-graphics/piglit/piglit_git.bb |  3 +
 4 files changed, 171 insertions(+)
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch

diff --git 
a/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
 
b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
new file mode 100644
index 000..f3aa1ba
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
@@ -0,0 +1,54 @@
+From a6608f218b5023cef36b3de5ec3c5f00b0211d1c Mon Sep 17 00:00:00 2001
+From: Daniel Diaz <daniel.d...@linaro.org>
+Date: Wed, 17 May 2017 18:00:15 -0500
+Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The EGL_MESA_platform_surfaceless extension was introduced not too long
+ago. Add support for it our helper.
+
+Upstream-Status: Accepted, since git 7b74602.
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+Reviewed-by: Emil Velikov <emil.veli...@collabora.com>
+---
+ tests/util/piglit-util-egl.c | 7 +++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
+index 106c735..389fe12 100644
+--- a/tests/util/piglit-util-egl.c
 b/tests/util/piglit-util-egl.c
+@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform)
+   static bool has_x11 = false;
+   static bool has_wayland = false;
+   static bool has_gbm = false;
++  static bool has_surfaceless_mesa = false;
+ 
+   static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void 
*native_display, const EGLint *attrib_list);
+ 
+@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform)
+   has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_x11");
+   has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_wayland");
+   has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_gbm");
++  has_surfaceless_mesa = 
piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_MESA_platform_surfaceless");
+ 
+   peglGetPlatformDisplayEXT = (void*) 
eglGetProcAddress("eglGetPlatformDisplayEXT");
+   }
+@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform)
+   return EGL_NO_DISPLAY;
+   }
+   break;
++  case EGL_PLATFORM_SURFACELESS_MESA:
++  if (!has_surfaceless_mesa) {
++  return EGL_NO_DISPLAY;
++  }
++  break;
+   default:
+   fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, 
platform);
+   return EGL_NO_DISPLAY;
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
 
b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
new file mode 100644
index 000..0f24dc1
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
@@ -0,0 +1,36 @@
+From c0dc430b8f5deeacdb11cd188195e16f512af233 Mon Sep 17 00:00:00 2001
+From: Daniel Diaz <daniel.d...@linaro.org>
+Date: Wed, 17 May 2017 18:00:16 -0500
+Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use
+ eglGetPlatformDisplay directly
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The entry point is not guaranteed to exist, so use the
+piglit_egl_get_

[OE-core] [PATCH 1/3 v2][pyro] piglit: depend on virtual/egl

2017-06-07 Thread Daniel Díaz
[Backported from master.]

While building for Hikey using Mali 450 driver (r6p0), an
error like the following appears while linking:

  [  1%] Linking C shared library ../../../../lib/libpiglitutil.so
  [...]
  [...]/aarch64-linaro-linux/gcc/aarch64-linaro-linux/6.3.1/ld: cannot find 
-lEGL
  collect2: error: ld returned 1 exit status
  make[2]: *** [lib/libpiglitutil.so.0] Error 1

Mesa generally provides virtual/egl (along with virtual/libgl,
which satisfies Piglit's current DEPENDS) but that is not the
implementation to use with Mali.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: No change, just resending.
 
 meta/recipes-graphics/piglit/piglit_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index d6bfb14..eae3eed 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -14,7 +14,7 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native"
+DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
 
 inherit cmake python3native distro_features_check bash-completion
 # depends on virtual/libx11
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] piglit: fix building issues regarding gbm_bo_map and a MESA test

2017-06-01 Thread Daniel Díaz
These patches fix a few building problems but are not being
taken into consideration at the moment, even though they have
been reviewed upstream with most of them merged (and accepted
already in OE-core master):
1.- CMake: define GBM_BO_MAP only when symbol is found
2.- util/egl: Honour Surfaceless MESA in get_default_display
3.- egl_mesa_platform_surfaceless: Don't use eglGetPlatformDisplay directly
4.- egl_mesa_platform_surfaceless: Use EXT functions for surfaces

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-graphics/piglit/piglit_git.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index eae3eed..2ea5779 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -5,6 +5,10 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0"
 SRC_URI = "git://anongit.freedesktop.org/piglit \
file://0001-cmake-install-bash-completions-in-the-right-place.patch 
\
file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch 
\
+   file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch 
\
+   
file://0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch \
+   
file://0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch \
+   
file://0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch \
"
 
 # From 2017-02-06
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3][pyro] piglit: add patches for unbuildable surfaceless Mesa test

2017-06-01 Thread Daniel Díaz
[Backported from master.]

Some EGL implementations do not actually ship all Khronos-
extensions. As it turns out, the Mali 450 driver does not
include any of the following symbols, used by the
egl_mesa_platform_surfaceless.c spec test:
* eglGetPlatformDisplay
* eglCreatePlatformPixmapSurface
* eglCreatePlatformWindowSurface

The Right Thing To Do was to obtain the implementation of
these functions (via eglGetProcAddress), as is provided
by their EXT counterparts. These are guaranteed to exist
since they are required by EGL_EXT_platform_base.

Upstream-Status: Accepted, since git 7b74602.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 ...nour-Surfaceless-MESA-in-get_default_disp.patch | 48 ++
 ...atform_surfaceless-Don-t-use-eglGetPlatfo.patch | 30 +
 ...atform_surfaceless-Use-EXT-functions-for-.patch | 75 ++
 3 files changed, 153 insertions(+)
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch

diff --git 
a/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
 
b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
new file mode 100644
index 000..734de2b
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
@@ -0,0 +1,48 @@
+From aa6728cc4941a87e3933c2aa770ab8ae3080b870 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Tue, 16 May 2017 12:37:07 -0500
+Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ tests/util/piglit-util-egl.c | 7 +++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
+index 106c735..389fe12 100644
+--- a/tests/util/piglit-util-egl.c
 b/tests/util/piglit-util-egl.c
+@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform)
+   static bool has_x11 = false;
+   static bool has_wayland = false;
+   static bool has_gbm = false;
++  static bool has_surfaceless_mesa = false;
+ 
+   static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void 
*native_display, const EGLint *attrib_list);
+ 
+@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform)
+   has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_x11");
+   has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_wayland");
+   has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_gbm");
++  has_surfaceless_mesa = 
piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_MESA_platform_surfaceless");
+ 
+   peglGetPlatformDisplayEXT = (void*) 
eglGetProcAddress("eglGetPlatformDisplayEXT");
+   }
+@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform)
+   return EGL_NO_DISPLAY;
+   }
+   break;
++  case EGL_PLATFORM_SURFACELESS_MESA:
++  if (!has_surfaceless_mesa) {
++  return EGL_NO_DISPLAY;
++  }
++  break;
+   default:
+   fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, 
platform);
+   return EGL_NO_DISPLAY;
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
 
b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
new file mode 100644
index 000..7ec71dd
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
@@ -0,0 +1,30 @@
+From b02bdbfdba3464ce47f87c04bcd1d35a8fef3f54 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Wed, 17 May 2017 17:53:10 -0500
+Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use
+ eglGetPlatformDisplay directly
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ .../spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c  | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git 
a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c 
b/tests/egl/spec/egl_mesa_platform_surface

[OE-core] [PATCH 2/3][pyro] piglit: add patch for lack of gbm_bo_map

2017-06-01 Thread Daniel Díaz
[Backported from master.]

[Piglit Bug #100978] -- https://bugs.freedesktop.org/show_bug.cgi?id=100978

When linking against Mali 450 r6, errors like the following
can be seen:
  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
  collect2: error: ld returned 1 exit status
  make[2]: *** [bin/point-sprite] Error 1

This is due to gbm_bo_map() and gbm_bo_unmap() being recently
added but not yet implemented by all graphics drivers.

Instead of relying on GBM's version, actually try to link
against those symbols.

Upstream-Status: Submitted [pig...@lists.freedesktop.org]

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 ...fine-GBM_BO_MAP-only-when-symbol-is-found.patch | 48 ++
 1 file changed, 48 insertions(+)
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch

diff --git 
a/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
 
b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
new file mode 100644
index 000..0750676
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
@@ -0,0 +1,48 @@
+From 6b6acee8841d092e5066b1bec2ba1c49cce4f91f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Thu, 4 May 2017 00:57:39 -0500
+Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gbm_bo_map() and _unmap() have been added recently to Mesa,
+and this update may not have reached all implementations of
+GBM, such as the one provided by Mali r6, where said
+definitions can be found in the header file but not in the
+library itself. This leads to errors like the following when
+linking:
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
+  collect2: error: ld returned 1 exit status
+  make[2]: *** [bin/point-sprite] Error 1
+
+Instead of relying on the header file, actually try to link
+using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP
+should be defined.
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+Reviewed-by: Jan Vesely <jan.ves...@rutgers.edu>
+---
+ CMakeLists.txt | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4ff99e..cc26fa8 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+   if(GBM_FOUND)
+   set(PIGLIT_HAS_GBM True)
+   add_definitions(-DPIGLIT_HAS_GBM)
+-  if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION 
VERSION_GREATER "12.1")
+-  set(PIGLIT_HAS_GBM_BO_MAP True)
++  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} 
${GBM_LIBRARIES})
++  CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
++  if (PIGLIT_HAS_GBM_BO_MAP)
+   add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
+   endif()
+   endif(GBM_FOUND)
+-- 
+1.9.1
+
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3][pyro] piglit: depend on virtual/egl

2017-06-01 Thread Daniel Díaz
[Backported from master.]

While building for Hikey using Mali 450 driver (r6p0), an
error like the following appears while linking:

  [  1%] Linking C shared library ../../../../lib/libpiglitutil.so
  [...]
  [...]/aarch64-linaro-linux/gcc/aarch64-linaro-linux/6.3.1/ld: cannot find 
-lEGL
  collect2: error: ld returned 1 exit status
  make[2]: *** [lib/libpiglitutil.so.0] Error 1

Mesa generally provides virtual/egl (along with virtual/libgl,
which satisfies Piglit's current DEPENDS) but that is not the
implementation to use with Mali.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-graphics/piglit/piglit_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index d6bfb14..eae3eed 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -14,7 +14,7 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native"
+DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
 
 inherit cmake python3native distro_features_check bash-completion
 # depends on virtual/libx11
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/3] piglit: depend on virtual/egl

2017-05-29 Thread Daniel Díaz Rodríguez
Ping on this series (#6793 in Patchwork).

-- 
ddiaz



On 18 May 2017 at 13:22, Daniel Díaz <daniel.d...@linaro.org> wrote:
> While building for Hikey using Mali 450 driver (r6p0), an
> error like the following appears while linking:
>
>   [  1%] Linking C shared library ../../../../lib/libpiglitutil.so
>   [...]
>   [...]/aarch64-linaro-linux/gcc/aarch64-linaro-linux/6.3.1/ld: cannot find 
> -lEGL
>   collect2: error: ld returned 1 exit status
>   make[2]: *** [lib/libpiglitutil.so.0] Error 1
>
> Mesa generally provides virtual/egl (along with virtual/libgl,
> which satisfies Piglit's current DEPENDS) but that is not the
> implementation to use with Mali.
>
> Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
> ---
>  meta/recipes-graphics/piglit/piglit_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
> b/meta/recipes-graphics/piglit/piglit_git.bb
> index d6bfb14..eae3eed 100644
> --- a/meta/recipes-graphics/piglit/piglit_git.bb
> +++ b/meta/recipes-graphics/piglit/piglit_git.bb
> @@ -14,7 +14,7 @@ PV = "1.0+gitr${SRCPV}"
>
>  S = "${WORKDIR}/git"
>
> -DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle 
> virtual/libgl libglu python3-mako-native python3-numpy-native 
> python3-six-native"
> +DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle 
> virtual/libgl libglu python3-mako-native python3-numpy-native 
> python3-six-native virtual/egl"
>
>  inherit cmake python3native distro_features_check bash-completion
>  # depends on virtual/libx11
> --
> 1.9.1
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 3/3] piglit: add patches for unbuildable surfaceless Mesa test

2017-05-18 Thread Daniel Díaz
Some EGL implementations do not actually ship all Khronos-
extensions. As it turns out, the Mali 450 driver does not
include any of the following symbols, used by the
egl_mesa_platform_surfaceless.c spec test:
* eglGetPlatformDisplay
* eglCreatePlatformPixmapSurface
* eglCreatePlatformWindowSurface

The Right Thing To Do was to obtain the implementation of
these functions (via eglGetProcAddress), as is provided
by their EXT counterparts. These are guaranteed to exist
since they are required by EGL_EXT_platform_base.

Upstream-Status: Submitted [pig...@lists.freedesktop.org]

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 ...nour-Surfaceless-MESA-in-get_default_disp.patch | 48 ++
 ...atform_surfaceless-Don-t-use-eglGetPlatfo.patch | 30 +
 ...atform_surfaceless-Use-EXT-functions-for-.patch | 75 ++
 3 files changed, 153 insertions(+)
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch

diff --git 
a/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
 
b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
new file mode 100644
index 000..734de2b
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
@@ -0,0 +1,48 @@
+From aa6728cc4941a87e3933c2aa770ab8ae3080b870 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Tue, 16 May 2017 12:37:07 -0500
+Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ tests/util/piglit-util-egl.c | 7 +++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
+index 106c735..389fe12 100644
+--- a/tests/util/piglit-util-egl.c
 b/tests/util/piglit-util-egl.c
+@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform)
+   static bool has_x11 = false;
+   static bool has_wayland = false;
+   static bool has_gbm = false;
++  static bool has_surfaceless_mesa = false;
+ 
+   static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void 
*native_display, const EGLint *attrib_list);
+ 
+@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform)
+   has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_x11");
+   has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_wayland");
+   has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_EXT_platform_gbm");
++  has_surfaceless_mesa = 
piglit_is_egl_extension_supported(EGL_NO_DISPLAY, 
"EGL_MESA_platform_surfaceless");
+ 
+   peglGetPlatformDisplayEXT = (void*) 
eglGetProcAddress("eglGetPlatformDisplayEXT");
+   }
+@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform)
+   return EGL_NO_DISPLAY;
+   }
+   break;
++  case EGL_PLATFORM_SURFACELESS_MESA:
++  if (!has_surfaceless_mesa) {
++  return EGL_NO_DISPLAY;
++  }
++  break;
+   default:
+   fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, 
platform);
+   return EGL_NO_DISPLAY;
+-- 
+1.9.1
+
diff --git 
a/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
 
b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
new file mode 100644
index 000..7ec71dd
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
@@ -0,0 +1,30 @@
+From b02bdbfdba3464ce47f87c04bcd1d35a8fef3f54 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Wed, 17 May 2017 17:53:10 -0500
+Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use
+ eglGetPlatformDisplay directly
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ .../spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c  | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git 
a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c 
b/tests/egl/spec/egl_mesa_platform_surface

[OE-core] [PATCH 2/3] piglit: add patch for lack of gbm_bo_map

2017-05-18 Thread Daniel Díaz
[Piglit Bug #100978] -- https://bugs.freedesktop.org/show_bug.cgi?id=100978

When linking against Mali 450 r6, errors like the following
can be seen:
  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
  collect2: error: ld returned 1 exit status
  make[2]: *** [bin/point-sprite] Error 1

This is due to gbm_bo_map() and gbm_bo_unmap() being recently
added but not yet implemented by all graphics drivers.

Instead of relying on GBM's version, actually try to link
against those symbols.

Upstream-Status: Submitted [pig...@lists.freedesktop.org]

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 ...fine-GBM_BO_MAP-only-when-symbol-is-found.patch | 48 ++
 1 file changed, 48 insertions(+)
 create mode 100644 
meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch

diff --git 
a/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
 
b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
new file mode 100644
index 000..0750676
--- /dev/null
+++ 
b/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
@@ -0,0 +1,48 @@
+From 6b6acee8841d092e5066b1bec2ba1c49cce4f91f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Thu, 4 May 2017 00:57:39 -0500
+Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gbm_bo_map() and _unmap() have been added recently to Mesa,
+and this update may not have reached all implementations of
+GBM, such as the one provided by Mali r6, where said
+definitions can be found in the header file but not in the
+library itself. This leads to errors like the following when
+linking:
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
+  collect2: error: ld returned 1 exit status
+  make[2]: *** [bin/point-sprite] Error 1
+
+Instead of relying on the header file, actually try to link
+using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP
+should be defined.
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+Reviewed-by: Jan Vesely <jan.ves...@rutgers.edu>
+---
+ CMakeLists.txt | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4ff99e..cc26fa8 100644
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+   if(GBM_FOUND)
+   set(PIGLIT_HAS_GBM True)
+   add_definitions(-DPIGLIT_HAS_GBM)
+-  if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION 
VERSION_GREATER "12.1")
+-  set(PIGLIT_HAS_GBM_BO_MAP True)
++  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} 
${GBM_LIBRARIES})
++  CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
++  if (PIGLIT_HAS_GBM_BO_MAP)
+   add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
+   endif()
+   endif(GBM_FOUND)
+-- 
+1.9.1
+
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/3] piglit: depend on virtual/egl

2017-05-18 Thread Daniel Díaz
While building for Hikey using Mali 450 driver (r6p0), an
error like the following appears while linking:

  [  1%] Linking C shared library ../../../../lib/libpiglitutil.so
  [...]
  [...]/aarch64-linaro-linux/gcc/aarch64-linaro-linux/6.3.1/ld: cannot find 
-lEGL
  collect2: error: ld returned 1 exit status
  make[2]: *** [lib/libpiglitutil.so.0] Error 1

Mesa generally provides virtual/egl (along with virtual/libgl,
which satisfies Piglit's current DEPENDS) but that is not the
implementation to use with Mali.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-graphics/piglit/piglit_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/piglit/piglit_git.bb 
b/meta/recipes-graphics/piglit/piglit_git.bb
index d6bfb14..eae3eed 100644
--- a/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/meta/recipes-graphics/piglit/piglit_git.bb
@@ -14,7 +14,7 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native"
+DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl 
libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
 
 inherit cmake python3native distro_features_check bash-completion
 # depends on virtual/libx11
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][morty] base-files: resize only serial tty's in profile

2017-04-07 Thread Daniel Díaz
[Backported from master.]

We don't want to run resize on non serial consoles. There's
been an earlier attempt (6557787), so this builds upon that.

The problem we're seeing is that if there is text buffered in
the virtual console (like from a desperate user trying to
enter login details), resize will get stuck while calling
  ioctl(tty, TCSETAW);

Since serial consoles are named (not just numbered), this
change limits resize's reach even further to run only on
/dev/tty[A-z] (thus avoiding /dev/tty[0-9]).

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files/profile 
b/meta/recipes-core/base-files/base-files/profile
index 7367fd1..c616616 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -26,7 +26,7 @@ if [ -x /usr/bin/resize ] && termpath="`tty`"; then
   # Make sure we are on a serial console (i.e. the device used starts with 
/dev/tty),
   # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
   case "$termpath" in
-  /dev/tty*) resize >/dev/null
+  /dev/tty[A-z]*) resize >/dev/null
   esac
 fi
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][krogoth] base-files: resize only serial tty's in profile

2017-04-07 Thread Daniel Díaz
[Backported from master.]

We don't want to run resize on non serial consoles. There's
been an earlier attempt (6557787), so this builds upon that.

The problem we're seeing is that if there is text buffered in
the virtual console (like from a desperate user trying to
enter login details), resize will get stuck while calling
  ioctl(tty, TCSETAW);

Since serial consoles are named (not just numbered), this
change limits resize's reach even further to run only on
/dev/tty[A-z] (thus avoiding /dev/tty[0-9]).

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files/profile 
b/meta/recipes-core/base-files/base-files/profile
index 1f02e52..e449b15 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -32,7 +32,7 @@ if [ -x /usr/bin/resize ] && termpath="`tty`"; then
   # Make sure we are on a serial console (i.e. the device used starts with 
/dev/tty),
   # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
   case "$termpath" in
-  /dev/tty*) resize >/dev/null
+  /dev/tty[A-z]*) resize >/dev/null
   esac
 fi
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] base-files: resize only serial tty's in profile

2017-03-23 Thread Daniel Díaz
We don't want to run resize on non serial consoles. There's
been an earlier attempt (6557787), so this builds upon that.

The problem we're seeing is that if there is text buffered in
the virtual console (like from a desperate user trying to
enter login details), resize will get stuck while calling
  ioctl(tty, TCSETAW);

Since serial consoles are named (not just numbered), this
change limits resize's reach even further to run only on
/dev/tty[A-z] (thus avoiding /dev/tty[0-9]).

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: Rationale behind this patch, no functional change.

 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files/profile 
b/meta/recipes-core/base-files/base-files/profile
index 7367fd1..c616616 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -26,7 +26,7 @@ if [ -x /usr/bin/resize ] && termpath="`tty`"; then
   # Make sure we are on a serial console (i.e. the device used starts with 
/dev/tty),
   # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
   case "$termpath" in
-  /dev/tty*) resize >/dev/null
+  /dev/tty[A-z]*) resize >/dev/null
   esac
 fi
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] base-files: resize only serial tty's in profile

2017-03-23 Thread Daniel Díaz
Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-core/base-files/base-files/profile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files/profile 
b/meta/recipes-core/base-files/base-files/profile
index 7367fd1..c616616 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -26,7 +26,7 @@ if [ -x /usr/bin/resize ] && termpath="`tty`"; then
   # Make sure we are on a serial console (i.e. the device used starts with 
/dev/tty),
   # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
   case "$termpath" in
-  /dev/tty*) resize >/dev/null
+  /dev/tty[A-z]*) resize >/dev/null
   esac
 fi
 
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] RFC: weston-init: Update systemd service unit.

2016-12-09 Thread Daniel Díaz
Based on the "ultimate" systemd service unit [1], this unit
works without the need of weston-start/weston-launch, as is
recommended by Weston developers.

It handles:
* proper VT/tty allocation and handling,
* PAM login (XDG environment settings),
* correct logging,
* optional arguments to Weston via config file.

[1] https://phabricator.freedesktop.org/T63

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 meta/recipes-graphics/wayland/weston-init.bb   |  6 +
 .../wayland/weston-init/weston.service | 31 +++---
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 22ba5f3..4a97eba 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -10,7 +10,13 @@ S = "${WORKDIR}"
 
 do_install() {
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+
+   # Install weston.service systemd service unit
install -Dm0644 ${WORKDIR}/weston.service 
${D}${systemd_system_unitdir}/weston.service
+   sed -i  -e 's,/usr/bin,${bindir},g' \
+   -e 's,/etc,${sysconfdir},g' \
+   -e 's,/var,${localstatedir},g \
+   ${D}${systemd_system_unitdir}/weston.service
 
# Install weston-start script
install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service 
b/meta/recipes-graphics/wayland/weston-init/weston.service
index 689ce41..66d49ec 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -1,12 +1,37 @@
 [Unit]
-Description=Weston Wayland Compositor
+Description=Weston Wayland Compositor (on tty7)
 RequiresMountsFor=/run
+Conflicts=getty@tty7.service plymouth-quit.service
+After=systemd-user-sessions.service getty@tty7.service 
plymouth-quit-wait.service
 
 [Service]
 User=root
+PermissionsStartOnly=true
+
+# Log us in via PAM so we get our XDG & co. environment and
+# are treated as logged in so we can use the tty:
+PAMName=login
+
+# Grab tty7
+UtmpIdentifier=tty7
+TTYPath=/dev/tty7
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+
+# stderr to journal so our logging doesn't get thrown into /dev/null
+StandardOutput=tty
+StandardInput=tty
+StandardError=journal
+
 EnvironmentFile=-/etc/default/weston
-ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS
+
+# Weston does not successfully change VT, nor does systemd place us on
+# the VT it just activated for us. Switch manually:
+ExecStartPre=/usr/bin/chvt 7
+ExecStart=/usr/bin/weston --log=/var/log/weston.log $OPTARGS
+
+IgnoreSIGPIPE=no
 
 [Install]
 WantedBy=multi-user.target
-
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][morty] weston: Add no-input-device patch to 1.11.0.

2016-11-24 Thread Daniel Díaz
The included patch, backported from Weston master (and OE-Core
master since Weston 1.11.1, b6864b1), allows it to run without
any input device at launch. An ini option is introduced for
this purpose, so there is no behavioral change.

Related change in weston.ini:
  [core]
  require-input=true

Default is true; setting it false allows Weston to run
without a keyboard or mouse, which is handy for automated
environments.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 ...on-1.11-config-option-for-no-input-device.patch | 123 +
 meta/recipes-graphics/wayland/weston_1.11.0.bb |   1 +
 2 files changed, 124 insertions(+)
 create mode 100644 
meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch

diff --git 
a/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
 
b/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
new file mode 100644
index 000..6f5ad66
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
@@ -0,0 +1,123 @@
+From bbf2e6ebbd9c051775f43e1e3c3a2f41322342e8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Fri, 21 Oct 2016 14:03:13 -0500
+Subject: [PATCH] Add configuration option for no input device.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[Backported from master, 75b7197.]
+
+As it has been discussed in the past [1], running Weston
+without any input device at launch might be beneficial for
+some use cases.
+
+Certainly, it's best for the vast majority of users (and
+the project) to require an input device to be present, as
+to avoid frustration and hassle, but for those brave souls
+that so prefer, this patch lets them run without any input
+device at all.
+
+This introduces a simple configuration in weston.ini:
+  [core]
+  require-input=true
+
+True is the default, so no behavioral change is introduced.
+
+[1] 
https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ man/weston.ini.man  | 5 +
+ src/compositor.h| 4 
+ src/libinput-seat.c | 6 ++
+ src/main.c  | 5 +
+ weston.ini.in   | 1 +
+ 5 files changed, 21 insertions(+)
+
+diff --git a/man/weston.ini.man b/man/weston.ini.man
+index d7c4a6f..c7d0f01 100644
+--- a/man/weston.ini.man
 b/man/weston.ini.man
+@@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. 
On the other
+ hand, if none of these sets the value, default idle timeout will be
+ set to 300 seconds.
+ .RS
++.PP
++.RE
++.TP 7
++.BI "require-input=" true
++require an input device for launch
+ 
+ .SH "LIBINPUT SECTION"
+ The
+diff --git a/src/compositor.h b/src/compositor.h
+index 0bbf458..476b650 100644
+--- a/src/compositor.h
 b/src/compositor.h
+@@ -803,6 +803,10 @@ struct weston_compositor {
+ 
+   void *user_data;
+   void (*exit)(struct weston_compositor *c);
++
++  /* Whether to let the compositor run without any input device. */
++  bool require_input;
++
+ };
+ 
+ struct weston_buffer {
+diff --git a/src/libinput-seat.c b/src/libinput-seat.c
+index 8ce0ee0..e1fdcf0 100644
+--- a/src/libinput-seat.c
 b/src/libinput-seat.c
+@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *input)
+   devices_found = 1;
+   }
+ 
++  if (devices_found == 0 && !c->require_input) {
++  weston_log("warning: no input devices found, but none required "
++ "as per configuration.\n");
++  return 0;
++  }
++
+   if (devices_found == 0) {
+   weston_log(
+   "warning: no input devices on entering Weston. "
+diff --git a/src/main.c b/src/main.c
+index 3279ac6..09905ea 100644
+--- a/src/main.c
 b/src/main.c
+@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[])
+   struct wl_client *primary_client;
+   struct wl_listener primary_client_destroyed;
+   struct weston_seat *seat;
++  int require_input;
+ 
+   const struct weston_option core_options[] = {
+   { WESTON_OPTION_STRING, "backend", 'B',  },
+@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[])
+   if (weston_compositor_init_config(ec, config) < 0)
+   goto out;
+ 
++  weston_config_section_get_bool(section, "require-input",
++ _input, true);
++  ec->require_input = require_input;
++
+   if (load_backend(ec, backend, , argv, config) < 0) {
+   weston_log("fatal: failed to create compositor backend\n");
+   goto out;
+diff --git a/weston.ini.in b/weston.ini.in
+index 14a4c0c..d837fb5 100644
+--- a/weston.ini.in
 b/w

[OE-core] [PATCH v2][krogoth] weston: Add no-input-device patch to 1.9.0.

2016-11-24 Thread Daniel Díaz
The included patch, backported from Weston master (and OE-Core
master since Weston 1.11.1, b6864b1), allows it to run without
any input device at launch. An ini option is introduced for
this purpose, so there is no behavioral change.

Related change in weston.ini:
  [core]
  require-input=true

Default is true; setting it false allows Weston to run
without a keyboard or mouse, which is handy for automated
environments.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
v2: Reposted now that the patch made it to OE-Core master.

 ...ton-1.9-config-option-for-no-input-device.patch | 123 +
 meta/recipes-graphics/wayland/weston_1.9.0.bb  |   1 +
 2 files changed, 124 insertions(+)
 create mode 100644 
meta/recipes-graphics/wayland/weston/weston-1.9-config-option-for-no-input-device.patch

diff --git 
a/meta/recipes-graphics/wayland/weston/weston-1.9-config-option-for-no-input-device.patch
 
b/meta/recipes-graphics/wayland/weston/weston-1.9-config-option-for-no-input-device.patch
new file mode 100644
index 000..61a54fd
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/weston/weston-1.9-config-option-for-no-input-device.patch
@@ -0,0 +1,123 @@
+From 6c89292024cc08d4499916dc153c354175bd81c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Fri, 21 Oct 2016 14:03:13 -0500
+Subject: [PATCH] Add configuration option for no input device.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[Backported from master, 75b7197.]
+
+As it has been discussed in the past [1], running Weston
+without any input device at launch might be beneficial for
+some use cases.
+
+Certainly, it's best for the vast majority of users (and
+the project) to require an input device to be present, as
+to avoid frustration and hassle, but for those brave souls
+that so prefer, this patch lets them run without any input
+device at all.
+
+This introduces a simple configuration in weston.ini:
+  [core]
+  require-input=true
+
+True is the default, so no behavioral change is introduced.
+
+[1] 
https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+---
+ man/weston.ini.man  | 5 +
+ src/compositor.h| 4 
+ src/libinput-seat.c | 6 ++
+ src/main.c  | 5 +
+ weston.ini.in   | 1 +
+ 5 files changed, 21 insertions(+)
+
+diff --git a/man/weston.ini.man b/man/weston.ini.man
+index a9b6026..668b16f 100644
+--- a/man/weston.ini.man
 b/man/weston.ini.man
+@@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. 
On the other
+ hand, if none of these sets the value, default idle timeout will be
+ set to 300 seconds.
+ .RS
++.PP
++.RE
++.TP 7
++.BI "require-input=" true
++require an input device for launch
+ 
+ .SH "LIBINPUT SECTION"
+ The
+diff --git a/src/compositor.h b/src/compositor.h
+index c4c81f0..292a412 100644
+--- a/src/compositor.h
 b/src/compositor.h
+@@ -701,6 +701,10 @@ struct weston_compositor {
+ 
+   void *user_data;
+   void (*exit)(struct weston_compositor *c);
++
++  /* Whether to let the compositor run without any input device. */
++  bool require_input;
++
+ };
+ 
+ struct weston_buffer {
+diff --git a/src/libinput-seat.c b/src/libinput-seat.c
+index c9f9ed2..1c4c358 100644
+--- a/src/libinput-seat.c
 b/src/libinput-seat.c
+@@ -250,6 +250,12 @@ udev_input_enable(struct udev_input *input)
+   devices_found = 1;
+   }
+ 
++  if (devices_found == 0 && !c->require_input) {
++  weston_log("warning: no input devices found, but none required "
++ "as per configuration.\n");
++  return 0;
++  }
++
+   if (devices_found == 0) {
+   weston_log(
+   "warning: no input devices on entering Weston. "
+diff --git a/src/main.c b/src/main.c
+index a98570e..b8632e9 100644
+--- a/src/main.c
 b/src/main.c
+@@ -658,6 +658,7 @@ int main(int argc, char *argv[])
+   struct wl_client *primary_client;
+   struct wl_listener primary_client_destroyed;
+   struct weston_seat *seat;
++  int require_input;
+ 
+   const struct weston_option core_options[] = {
+   { WESTON_OPTION_STRING, "backend", 'B',  },
+@@ -737,6 +738,10 @@ int main(int argc, char *argv[])
+   if (weston_compositor_init_config(ec, config) < 0)
+   goto out_signals;
+ 
++  weston_config_section_get_bool(section, "require-input",
++ _input, true);
++  ec->require_input = require_input;
++
+   if (backend_init(ec, , argv, config) < 0) {
+   weston_log("fatal: failed to create compositor backend\n");
+   goto out_signals;
+diff --git a/weston.ini.in b/weston.ini.i

Re: [OE-core] Loss of a wayland socket by a systemd user session

2016-11-18 Thread Daniel Díaz
Hello!


On 11/18/2016 12:12 PM, Tomas Novotny wrote:
> I'm using weston and its 'weston-start' script shipped with oe-core (morty).
> It works perfectly until root is logged in. The problematic path is:
[...]

We've seen that [1]. If you have PAM, you can modify weston-start to
pass `-u root' to weston-launch [2].

You can also try this systemd service unit and launch Weston directly:
  https://github.com/mrchapp/meta-96boards/commit/ac3e11e

Greetings!

Daniel Díaz
daniel.d...@linaro.org


[1] https://bugs.linaro.org/show_bug.cgi?id=2576
[2] https://github.com/mrchapp/meta-96boards/commit/ee71b7e

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH][krogoth] weston: Add no-input-device patch to 1.9.0.

2016-10-25 Thread Daniel Díaz
The included patch, backported from Weston master, allows
it to run without any input device at launch. An ini option
is introduced for this purpose, so there is no behavioral
change.

Related change in weston.ini:
  [core]
  require-input=true

Default is true; setting it false allows Weston to run
without a keyboard or mouse, which is handy for automated
environments.

Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
---
 .../add-config-option-for-no-input-device.patch| 125 +
 meta/recipes-graphics/wayland/weston_1.9.0.bb  |   1 +
 2 files changed, 126 insertions(+)
 create mode 100644 
meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch

diff --git 
a/meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch
 
b/meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch
new file mode 100644
index 000..93376ef
--- /dev/null
+++ 
b/meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch
@@ -0,0 +1,125 @@
+From 6c89292024cc08d4499916dc153c354175bd81c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.d...@linaro.org>
+Date: Fri, 21 Oct 2016 14:03:13 -0500
+Subject: [PATCH] Add configuration option for no input device.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[Backported from master, 75b7197.)
+
+As it has been discussed in the past [1], running Weston
+without any input device at launch might be beneficial for
+some use cases.
+
+Certainly, it's best for the vast majority of users (and
+the project) to require an input device to be present, as
+to avoid frustration and hassle, but for those brave souls
+that so prefer, this patch lets them run without any input
+device at all.
+
+This introduces a simple configuration in weston.ini:
+  [core]
+  require-input=true
+
+True is the default, so no behavioral change is introduced.
+
+[1] 
https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
+
+Signed-off-by: Daniel Díaz <daniel.d...@linaro.org>
+Reviewed-by: Peter Hutterer <peter.hutte...@who-t.net>
+Reviewed-by: Daniel Stone <dani...@collabora.com>
+---
+ man/weston.ini.man  | 5 +
+ src/compositor.h| 4 
+ src/libinput-seat.c | 6 ++
+ src/main.c  | 5 +
+ weston.ini.in   | 1 +
+ 5 files changed, 21 insertions(+)
+
+diff --git a/man/weston.ini.man b/man/weston.ini.man
+index a9b6026..668b16f 100644
+--- a/man/weston.ini.man
 b/man/weston.ini.man
+@@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. 
On the other
+ hand, if none of these sets the value, default idle timeout will be
+ set to 300 seconds.
+ .RS
++.PP
++.RE
++.TP 7
++.BI "require-input=" true
++require an input device for launch
+ 
+ .SH "LIBINPUT SECTION"
+ The
+diff --git a/src/compositor.h b/src/compositor.h
+index c4c81f0..292a412 100644
+--- a/src/compositor.h
 b/src/compositor.h
+@@ -701,6 +701,10 @@ struct weston_compositor {
+ 
+   void *user_data;
+   void (*exit)(struct weston_compositor *c);
++
++  /* Whether to let the compositor run without any input device. */
++  bool require_input;
++
+ };
+ 
+ struct weston_buffer {
+diff --git a/src/libinput-seat.c b/src/libinput-seat.c
+index c9f9ed2..1c4c358 100644
+--- a/src/libinput-seat.c
 b/src/libinput-seat.c
+@@ -250,6 +250,12 @@ udev_input_enable(struct udev_input *input)
+   devices_found = 1;
+   }
+ 
++  if (devices_found == 0 && !c->require_input) {
++  weston_log("warning: no input devices found, but none required "
++ "as per configuration.\n");
++  return 0;
++  }
++
+   if (devices_found == 0) {
+   weston_log(
+   "warning: no input devices on entering Weston. "
+diff --git a/src/main.c b/src/main.c
+index a98570e..b8632e9 100644
+--- a/src/main.c
 b/src/main.c
+@@ -658,6 +658,7 @@ int main(int argc, char *argv[])
+   struct wl_client *primary_client;
+   struct wl_listener primary_client_destroyed;
+   struct weston_seat *seat;
++  int require_input;
+ 
+   const struct weston_option core_options[] = {
+   { WESTON_OPTION_STRING, "backend", 'B',  },
+@@ -737,6 +738,10 @@ int main(int argc, char *argv[])
+   if (weston_compositor_init_config(ec, config) < 0)
+   goto out_signals;
+ 
++  weston_config_section_get_bool(section, "require-input",
++ _input, true);
++  ec->require_input = require_input;
++
+   if (backend_init(ec, , argv, config) < 0) {
+   weston_log("fatal: failed to create compositor backend\n");
+   goto out_signals;
+diff --git a/weston.ini.in b/weston.ini.in
+index 06b51df..e9ef99