* [meta-oe][PATCH] ltrace: Fix build on mips
@ 2019-09-06 21:25 Khem Raj
2019-09-07 0:12 ` akuster808
0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2019-09-06 21:25 UTC (permalink / raw)
To: openembedded-devel
Newer kernel UAPI headers for mips have moved these needed defines
around
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../ltrace/ltrace/include_unistd_nr.patch | 30 +++++++++++++++++++
meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 +
2 files changed, 31 insertions(+)
create mode 100644 meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
new file mode 100644
index 0000000000..e4490bbb9e
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
@@ -0,0 +1,30 @@
+kernel headers have restructured mips syscall generation in kernel
+in recent versions, however, ltrace still has logic to define the
+syscall numbers based on old logic, this patch includes the legacy
+UAPI headers to get these defines
+
+Fixes errors e.g.
+../../../../git/sysdeps/linux-gnu/mips/trace.c:138:29: error: '__NR_O32_Linux' undeclared (first use in this function)
+ const int syscallbase[] = {__NR_O32_Linux, __NR_N32_Linux,
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+--- a/sysdeps/linux-gnu/mips/trace.c
++++ b/sysdeps/linux-gnu/mips/trace.c
+@@ -34,6 +34,16 @@
+ #include <assert.h>
+ #include <asm/unistd.h>
+
++#ifndef __NR_O32_Linux
++#include <asm/unistd_nr_o32.h>
++#endif
++#ifndef __NR_N32_Linux
++#include <asm/unistd_nr_n64.h>
++#endif
++#ifndef __NR_N64_Linux
++#include <asm/unistd_nr_n32.h>
++#endif
++
+ #include "backend.h"
+ #include "common.h"
+ #include "debug.h"
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
index 3dc269c80e..ead637cb7e 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http
file://0001-mips-plt.c-Delete-include-error.h.patch \
file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \
file://0001-hook-Do-not-append-int-to-std-string.patch \
+ file://include_unistd_nr.patch \
"
S = "${WORKDIR}/git"
--
2.23.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [meta-oe][PATCH] ltrace: Fix build on mips
2019-09-06 21:25 [meta-oe][PATCH] ltrace: Fix build on mips Khem Raj
@ 2019-09-07 0:12 ` akuster808
2019-09-07 0:17 ` Khem Raj
2019-09-07 10:21 ` Adrian Bunk
0 siblings, 2 replies; 6+ messages in thread
From: akuster808 @ 2019-09-07 0:12 UTC (permalink / raw)
To: Khem Raj, openembedded-devel
On 9/6/19 2:25 PM, Khem Raj wrote:
> Newer kernel UAPI headers for mips have moved these needed defines
> around
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
warrior too?
> ---
> .../ltrace/ltrace/include_unistd_nr.patch | 30 +++++++++++++++++++
> meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 +
> 2 files changed, 31 insertions(+)
> create mode 100644 meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
>
> diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
> new file mode 100644
> index 0000000000..e4490bbb9e
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
> @@ -0,0 +1,30 @@
> +kernel headers have restructured mips syscall generation in kernel
> +in recent versions, however, ltrace still has logic to define the
> +syscall numbers based on old logic, this patch includes the legacy
> +UAPI headers to get these defines
> +
> +Fixes errors e.g.
> +../../../../git/sysdeps/linux-gnu/mips/trace.c:138:29: error: '__NR_O32_Linux' undeclared (first use in this function)
> + const int syscallbase[] = {__NR_O32_Linux, __NR_N32_Linux,
> +
> +Upstream-Status: Pending
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +--- a/sysdeps/linux-gnu/mips/trace.c
> ++++ b/sysdeps/linux-gnu/mips/trace.c
> +@@ -34,6 +34,16 @@
> + #include <assert.h>
> + #include <asm/unistd.h>
> +
> ++#ifndef __NR_O32_Linux
> ++#include <asm/unistd_nr_o32.h>
> ++#endif
> ++#ifndef __NR_N32_Linux
> ++#include <asm/unistd_nr_n64.h>
> ++#endif
> ++#ifndef __NR_N64_Linux
> ++#include <asm/unistd_nr_n32.h>
> ++#endif
> ++
> + #include "backend.h"
> + #include "common.h"
> + #include "debug.h"
> diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> index 3dc269c80e..ead637cb7e 100644
> --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> @@ -27,6 +27,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http
> file://0001-mips-plt.c-Delete-include-error.h.patch \
> file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \
> file://0001-hook-Do-not-append-int-to-std-string.patch \
> + file://include_unistd_nr.patch \
> "
> S = "${WORKDIR}/git"
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [meta-oe][PATCH] ltrace: Fix build on mips
2019-09-07 0:12 ` akuster808
@ 2019-09-07 0:17 ` Khem Raj
2019-09-07 10:21 ` Adrian Bunk
1 sibling, 0 replies; 6+ messages in thread
From: Khem Raj @ 2019-09-07 0:17 UTC (permalink / raw)
To: akuster808; +Cc: openembedded-devel
I think yes
On Fri, Sep 6, 2019 at 5:12 PM akuster808 <akuster808@gmail.com> wrote:
>
>
> On 9/6/19 2:25 PM, Khem Raj wrote:
> > Newer kernel UAPI headers for mips have moved these needed defines
> > around
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>
> warrior too?
> > ---
> > .../ltrace/ltrace/include_unistd_nr.patch | 30 +++++++++++++++++++
> > meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 +
> > 2 files changed, 31 insertions(+)
> > create mode 100644
> meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
> >
> > diff --git
> a/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
> b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
> > new file mode 100644
> > index 0000000000..e4490bbb9e
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/ltrace/ltrace/include_unistd_nr.patch
> > @@ -0,0 +1,30 @@
> > +kernel headers have restructured mips syscall generation in kernel
> > +in recent versions, however, ltrace still has logic to define the
> > +syscall numbers based on old logic, this patch includes the legacy
> > +UAPI headers to get these defines
> > +
> > +Fixes errors e.g.
> > +../../../../git/sysdeps/linux-gnu/mips/trace.c:138:29: error:
> '__NR_O32_Linux' undeclared (first use in this function)
> > + const int syscallbase[] = {__NR_O32_Linux, __NR_N32_Linux,
> > +
> > +Upstream-Status: Pending
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +--- a/sysdeps/linux-gnu/mips/trace.c
> > ++++ b/sysdeps/linux-gnu/mips/trace.c
> > +@@ -34,6 +34,16 @@
> > + #include <assert.h>
> > + #include <asm/unistd.h>
> > +
> > ++#ifndef __NR_O32_Linux
> > ++#include <asm/unistd_nr_o32.h>
> > ++#endif
> > ++#ifndef __NR_N32_Linux
> > ++#include <asm/unistd_nr_n64.h>
> > ++#endif
> > ++#ifndef __NR_N64_Linux
> > ++#include <asm/unistd_nr_n32.h>
> > ++#endif
> > ++
> > + #include "backend.h"
> > + #include "common.h"
> > + #include "debug.h"
> > diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> > index 3dc269c80e..ead637cb7e 100644
> > --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> > +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
> > @@ -27,6 +27,7 @@ SRC_URI = "git://
> github.com/sparkleholic/ltrace.git;branch=master;protocol=http
> > file://0001-mips-plt.c-Delete-include-error.h.patch \
> >
> file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \
> > file://0001-hook-Do-not-append-int-to-std-string.patch \
> > + file://include_unistd_nr.patch \
> > "
> > S = "${WORKDIR}/git"
> >
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [meta-oe][PATCH] ltrace: Fix build on mips
2019-09-07 0:12 ` akuster808
2019-09-07 0:17 ` Khem Raj
@ 2019-09-07 10:21 ` Adrian Bunk
2019-09-07 14:36 ` Khem Raj
1 sibling, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2019-09-07 10:21 UTC (permalink / raw)
To: akuster808; +Cc: openembedded-devel
On Fri, Sep 06, 2019 at 05:12:24PM -0700, akuster808 wrote:
> On 9/6/19 2:25 PM, Khem Raj wrote:
> > Newer kernel UAPI headers for mips have moved these needed defines
> > around
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
>
> warrior too?
>...
No, this is not a problem with the UAPI headers in warrior.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [meta-oe][PATCH] ltrace: Fix build on mips
2019-09-07 10:21 ` Adrian Bunk
@ 2019-09-07 14:36 ` Khem Raj
2019-09-08 13:08 ` Adrian Bunk
0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2019-09-07 14:36 UTC (permalink / raw)
To: Adrian Bunk; +Cc: openembeded-devel
On Sat, Sep 7, 2019 at 3:21 AM Adrian Bunk <bunk@stusta.de> wrote:
>
> On Fri, Sep 06, 2019 at 05:12:24PM -0700, akuster808 wrote:
> > On 9/6/19 2:25 PM, Khem Raj wrote:
> > > Newer kernel UAPI headers for mips have moved these needed defines
> > > around
> > >
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >
> > warrior too?
> >...
>
> No, this is not a problem with the UAPI headers in warrior.
anything that's using kernel 5.0+ UAPI headers has this problem and
warrior is using 5.0
for linux-libc headers. see [1]
[1] https://github.com/torvalds/linux/commit/9bcbf97c62931f27ab2c52f0848dec0cd48aee78
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-oe][PATCH] ltrace: Fix build on mips
2019-09-07 14:36 ` Khem Raj
@ 2019-09-08 13:08 ` Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2019-09-08 13:08 UTC (permalink / raw)
To: Khem Raj; +Cc: openembeded-devel
On Sat, Sep 07, 2019 at 07:36:04AM -0700, Khem Raj wrote:
> On Sat, Sep 7, 2019 at 3:21 AM Adrian Bunk <bunk@stusta.de> wrote:
> >
> > On Fri, Sep 06, 2019 at 05:12:24PM -0700, akuster808 wrote:
> > > On 9/6/19 2:25 PM, Khem Raj wrote:
> > > > Newer kernel UAPI headers for mips have moved these needed defines
> > > > around
> > > >
> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > >
> > > warrior too?
> > >...
> >
> > No, this is not a problem with the UAPI headers in warrior.
>
> anything that's using kernel 5.0+ UAPI headers has this problem and
> warrior is using 5.0
> for linux-libc headers. see [1]
>
> [1] https://github.com/torvalds/linux/commit/9bcbf97c62931f27ab2c52f0848dec0cd48aee78
Thanks for correcting me, I was looking at the wrong commit.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-08 13:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-06 21:25 [meta-oe][PATCH] ltrace: Fix build on mips Khem Raj
2019-09-07 0:12 ` akuster808
2019-09-07 0:17 ` Khem Raj
2019-09-07 10:21 ` Adrian Bunk
2019-09-07 14:36 ` Khem Raj
2019-09-08 13:08 ` Adrian Bunk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.