All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: backport a fix for confusing non-fatal error
       [not found] <162C5AD9D44F999B.7353@lists.openembedded.org>
@ 2020-08-18 16:04 ` Martin Jansa
  2020-08-18 17:16   ` [OE-core] " Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2020-08-18 16:04 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Jansa

* add V=1 to make log.do_compile a bit more useful, with this it shows:
  /bin/sh '/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools/perf/trace/beauty/arch_errno_names.sh' x86_64-oe-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/recipe-sysroot /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools > /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/trace/beauty/generated/arch_errno_name_array.c
  find: unknown predicate `-m64/arch'
  x86_64-oe-linux-gcc: error: unrecognized command-line option '-m64/include/uapi/asm-generic/errno.h'
  x86_64-oe-linux-gcc: fatal error: no input files
  compilation terminated.
  x86_64-oe-linux-gcc: error: unrecognized command-line option '-m64/include/uapi/asm-generic/errno.h'
  x86_64-oe-linux-gcc: fatal error: no input files
  compilation terminated.

* apply https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
  with sed call to fix this

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-kernel/perf/perf.bb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index cf95df710f..868cde7353 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -70,6 +70,7 @@ SPDX_S = "${S}/tools/perf"
 LDFLAGS="-ldl -lutil"
 
 EXTRA_OEMAKE = '\
+    V=1 \
     -C ${S}/tools/perf \
     O=${B} \
     CROSS_COMPILE=${TARGET_PREFIX} \
@@ -201,6 +202,9 @@ do_configure_prepend () {
             ${S}/tools/perf/Makefile.perf
         sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
             ${S}/tools/perf/Makefile.perf
+        # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
+        sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
+            ${S}/tools/perf/Makefile.perf
     fi
     sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
         ${S}/tools/perf/Makefile*
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH] perf: backport a fix for confusing non-fatal error
  2020-08-18 16:04 ` [PATCH] perf: backport a fix for confusing non-fatal error Martin Jansa
@ 2020-08-18 17:16   ` Khem Raj
  2020-08-18 18:17     ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2020-08-18 17:16 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Tue, Aug 18, 2020 at 9:04 AM Martin Jansa <Martin.Jansa@gmail.com> wrote:
>
> * add V=1 to make log.do_compile a bit more useful, with this it shows:
>   /bin/sh '/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools/perf/trace/beauty/arch_errno_names.sh' x86_64-oe-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/recipe-sysroot /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools > /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/trace/beauty/generated/arch_errno_name_array.c
>   find: unknown predicate `-m64/arch'
>   x86_64-oe-linux-gcc: error: unrecognized command-line option '-m64/include/uapi/asm-generic/errno.h'
>   x86_64-oe-linux-gcc: fatal error: no input files
>   compilation terminated.
>   x86_64-oe-linux-gcc: error: unrecognized command-line option '-m64/include/uapi/asm-generic/errno.h'
>   x86_64-oe-linux-gcc: fatal error: no input files
>   compilation terminated.
>
> * apply https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
>   with sed call to fix this
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta/recipes-kernel/perf/perf.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
> index cf95df710f..868cde7353 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -70,6 +70,7 @@ SPDX_S = "${S}/tools/perf"
>  LDFLAGS="-ldl -lutil"
>
>  EXTRA_OEMAKE = '\
> +    V=1 \
>      -C ${S}/tools/perf \
>      O=${B} \
>      CROSS_COMPILE=${TARGET_PREFIX} \
> @@ -201,6 +202,9 @@ do_configure_prepend () {
>              ${S}/tools/perf/Makefile.perf
>          sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
>              ${S}/tools/perf/Makefile.perf
> +        # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
> +        sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
> +            ${S}/tools/perf/Makefile.perf

This is good instead of patching every BSP kernel
how far back will it go patching ?

>      fi
>      sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
>          ${S}/tools/perf/Makefile*
> --
> 2.25.1
>
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] [PATCH] perf: backport a fix for confusing non-fatal error
  2020-08-18 17:16   ` [OE-core] " Khem Raj
@ 2020-08-18 18:17     ` Martin Jansa
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Jansa @ 2020-08-18 18:17 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3264 bytes --]

This patch fixes only the non-fatal find/CC concatenation issue.

For other fixes it might be cleaner to just patch BSP kernels, I've listed
some perf gcc-10 fixes in the linux-raspberrypi upgrade:
https://github.com/agherzan/meta-raspberrypi/pull/705
but sadly it shows that even relatively recent 5.4.51 isn't good enough for
perf and this wasn't even without -fcommon discussed in the another thread.

On Tue, Aug 18, 2020 at 7:16 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Tue, Aug 18, 2020 at 9:04 AM Martin Jansa <Martin.Jansa@gmail.com>
> wrote:
> >
> > * add V=1 to make log.do_compile a bit more useful, with this it shows:
> >   /bin/sh
> '/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools/perf/trace/beauty/arch_errno_names.sh'
> x86_64-oe-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse
> --sysroot=/OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/recipe-sysroot
> /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/tools
> >
> /OE/build/oe-core/tmp-glibc/work/qemux86_64-oe-linux/perf/1.0-r9/perf-1.0/trace/beauty/generated/arch_errno_name_array.c
> >   find: unknown predicate `-m64/arch'
> >   x86_64-oe-linux-gcc: error: unrecognized command-line option
> '-m64/include/uapi/asm-generic/errno.h'
> >   x86_64-oe-linux-gcc: fatal error: no input files
> >   compilation terminated.
> >   x86_64-oe-linux-gcc: error: unrecognized command-line option
> '-m64/include/uapi/asm-generic/errno.h'
> >   x86_64-oe-linux-gcc: fatal error: no input files
> >   compilation terminated.
> >
> > * apply
> https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
> >   with sed call to fix this
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta/recipes-kernel/perf/perf.bb | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/meta/recipes-kernel/perf/perf.bb
> b/meta/recipes-kernel/perf/perf.bb
> > index cf95df710f..868cde7353 100644
> > --- a/meta/recipes-kernel/perf/perf.bb
> > +++ b/meta/recipes-kernel/perf/perf.bb
> > @@ -70,6 +70,7 @@ SPDX_S = "${S}/tools/perf"
> >  LDFLAGS="-ldl -lutil"
> >
> >  EXTRA_OEMAKE = '\
> > +    V=1 \
> >      -C ${S}/tools/perf \
> >      O=${B} \
> >      CROSS_COMPILE=${TARGET_PREFIX} \
> > @@ -201,6 +202,9 @@ do_configure_prepend () {
> >              ${S}/tools/perf/Makefile.perf
> >          sed -i -e
> "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr'
> --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
> >              ${S}/tools/perf/Makefile.perf
> > +        # backport
> https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
> > +        sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC)
> $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
> > +            ${S}/tools/perf/Makefile.perf
>
> This is good instead of patching every BSP kernel
> how far back will it go patching ?
>
> >      fi
> >      sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr'
> --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
> >          ${S}/tools/perf/Makefile*
> > --
> > 2.25.1
> >
> > 
>

[-- Attachment #2: Type: text/html, Size: 4755 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-18 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <162C5AD9D44F999B.7353@lists.openembedded.org>
2020-08-18 16:04 ` [PATCH] perf: backport a fix for confusing non-fatal error Martin Jansa
2020-08-18 17:16   ` [OE-core] " Khem Raj
2020-08-18 18:17     ` Martin Jansa

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.