linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
@ 2020-02-13 18:21 zhe.he
  2020-02-13 18:21 ` [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table zhe.he
  2020-02-16 22:22 ` [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags Jiri Olsa
  0 siblings, 2 replies; 13+ messages in thread
From: zhe.he @ 2020-02-13 18:21 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, linux-kernel, zhe.he

From: He Zhe <zhe.he@windriver.com>

Since Python v3.8.0, with the following commit
0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),
--embed option must be passed to "python3-config --ldflags --embed" or
"python3-config --libs --embed" to get "-lpython3.8".

To make it compatible with all Python versons, according to the suggestion
in the commit log, we try with --embed first and then witout it if fails.

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 tools/perf/Makefile.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 80e55e7..b2eabcf 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -229,7 +229,7 @@ strip-libs  = $(filter-out -l%,$(1))
 PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
 
 ifdef PYTHON_CONFIG
-  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
+  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags --embed 2>/dev/null || $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
   PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
   PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
   PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --includes 2>/dev/null)
-- 
2.7.4


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

* [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table
  2020-02-13 18:21 [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags zhe.he
@ 2020-02-13 18:21 ` zhe.he
  2020-03-25 13:05   ` He Zhe
  2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for He Zhe
  2020-02-16 22:22 ` [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags Jiri Olsa
  1 sibling, 2 replies; 13+ messages in thread
From: zhe.he @ 2020-02-13 18:21 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, linux-kernel, zhe.he

From: He Zhe <zhe.he@windriver.com>

The $(CC) passed to arch_errno_names.sh may include a series of parameters
along with gcc itself. To avoid overwriting the following parameters of
arch_errno_names.sh and break the build like below, we just pick up the
first word of the $(CC).

find: unknown predicate `-m64/arch'
x86_64-wrs-linux-gcc: warning: '-x c' after last input file has no effect
x86_64-wrs-linux-gcc: error: unrecognized command line option '-m64/include/uapi/asm-generic/errno.h'
x86_64-wrs-linux-gcc: fatal error: no input files

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 3eda9d4..7114c11 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -573,7 +573,7 @@ arch_errno_hdr_dir := $(srctree)/tools
 arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
 
 $(arch_errno_name_array): $(arch_errno_tbl)
-	$(Q)$(SHELL) '$(arch_errno_tbl)' $(CC) $(arch_errno_hdr_dir) > $@
+	$(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@
 
 sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
 sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh
-- 
2.7.4


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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-02-13 18:21 [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags zhe.he
  2020-02-13 18:21 ` [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table zhe.he
@ 2020-02-16 22:22 ` Jiri Olsa
  2020-02-17  2:24   ` He Zhe
  1 sibling, 1 reply; 13+ messages in thread
From: Jiri Olsa @ 2020-02-16 22:22 UTC (permalink / raw)
  To: zhe.he
  Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, namhyung,
	linux-kernel, Sam Lunt

On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
> 
> Since Python v3.8.0, with the following commit
> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),

we got similar change recently.. might have not been picked up yet

  https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/

jirka

> --embed option must be passed to "python3-config --ldflags --embed" or
> "python3-config --libs --embed" to get "-lpython3.8".
> 
> To make it compatible with all Python versons, according to the suggestion
> in the commit log, we try with --embed first and then witout it if fails.
> 
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  tools/perf/Makefile.config | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 80e55e7..b2eabcf 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -229,7 +229,7 @@ strip-libs  = $(filter-out -l%,$(1))
>  PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
>  
>  ifdef PYTHON_CONFIG
> -  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
> +  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags --embed 2>/dev/null || $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
>    PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
>    PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
>    PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --includes 2>/dev/null)
> -- 
> 2.7.4
> 


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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-02-16 22:22 ` [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags Jiri Olsa
@ 2020-02-17  2:24   ` He Zhe
  2020-03-25 13:30     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: He Zhe @ 2020-02-17  2:24 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, namhyung,
	linux-kernel, Sam Lunt



On 2/17/20 6:22 AM, Jiri Olsa wrote:
> On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote:
>> From: He Zhe <zhe.he@windriver.com>
>>
>> Since Python v3.8.0, with the following commit
>> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),
> we got similar change recently.. might have not been picked up yet
>
>   https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/

Thanks for pointing out.

Zhe

>
> jirka
>
>> --embed option must be passed to "python3-config --ldflags --embed" or
>> "python3-config --libs --embed" to get "-lpython3.8".
>>
>> To make it compatible with all Python versons, according to the suggestion
>> in the commit log, we try with --embed first and then witout it if fails.
>>
>> Signed-off-by: He Zhe <zhe.he@windriver.com>
>> ---
>>  tools/perf/Makefile.config | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
>> index 80e55e7..b2eabcf 100644
>> --- a/tools/perf/Makefile.config
>> +++ b/tools/perf/Makefile.config
>> @@ -229,7 +229,7 @@ strip-libs  = $(filter-out -l%,$(1))
>>  PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
>>  
>>  ifdef PYTHON_CONFIG
>> -  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
>> +  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags --embed 2>/dev/null || $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
>>    PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
>>    PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
>>    PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --includes 2>/dev/null)
>> -- 
>> 2.7.4
>>


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

* Re: [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table
  2020-02-13 18:21 ` [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table zhe.he
@ 2020-03-25 13:05   ` He Zhe
  2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for He Zhe
  1 sibling, 0 replies; 13+ messages in thread
From: He Zhe @ 2020-03-25 13:05 UTC (permalink / raw)
  To: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
	namhyung, linux-kernel

Can this be considered for the moment?

Thanks,
Zhe

On 2/14/20 2:21 AM, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
>
> The $(CC) passed to arch_errno_names.sh may include a series of parameters
> along with gcc itself. To avoid overwriting the following parameters of
> arch_errno_names.sh and break the build like below, we just pick up the
> first word of the $(CC).
>
> find: unknown predicate `-m64/arch'
> x86_64-wrs-linux-gcc: warning: '-x c' after last input file has no effect
> x86_64-wrs-linux-gcc: error: unrecognized command line option '-m64/include/uapi/asm-generic/errno.h'
> x86_64-wrs-linux-gcc: fatal error: no input files
>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
>  tools/perf/Makefile.perf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 3eda9d4..7114c11 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -573,7 +573,7 @@ arch_errno_hdr_dir := $(srctree)/tools
>  arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
>  
>  $(arch_errno_name_array): $(arch_errno_tbl)
> -	$(Q)$(SHELL) '$(arch_errno_tbl)' $(CC) $(arch_errno_hdr_dir) > $@
> +	$(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@
>  
>  sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
>  sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh


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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-02-17  2:24   ` He Zhe
@ 2020-03-25 13:30     ` Arnaldo Carvalho de Melo
  2020-03-25 14:40       ` Sam Lunt
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-03-25 13:30 UTC (permalink / raw)
  To: He Zhe
  Cc: Jiri Olsa, peterz, mingo, mark.rutland, alexander.shishkin,
	namhyung, linux-kernel, Sam Lunt

Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu:
> 
> 
> On 2/17/20 6:22 AM, Jiri Olsa wrote:
> > On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote:
> >> From: He Zhe <zhe.he@windriver.com>
> >>
> >> Since Python v3.8.0, with the following commit
> >> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),
> > we got similar change recently.. might have not been picked up yet
> >
> >   https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
> 
> Thanks for pointing out.

So, just with your patch:

[acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
[acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
...                     libpython: [ OFF ]
Makefile.config:750: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev
  CC       /tmp/build/perf/tests/python-use.o
[acme@five perf]$

[acme@five perf]$ rpm -q python2-devel python3-devel python-devel
package python2-devel is not installed
python3-devel-3.7.6-2.fc31.x86_64
package python-devel is not installed
[acme@five perf]$

[acme@five perf]$ cat /tmp/build/perf/feature/test-libpython.make.output
/bin/sh: --configdir: command not found
[acme@five perf]$ cat /tmp/build/perf/feature/test-libpython
test-libpython.make.output          test-libpython-version.make.output
[acme@five perf]$ cat /tmp/build/perf/feature/test-libpython-version.make.output
/bin/sh: --configdir: command not found
[acme@five perf]$


Without your patch:

[acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
[acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
...                     libpython: [ on  ]
  GEN      /tmp/build/perf/python/perf.so
  MKDIR    /tmp/build/perf/scripts/python/Perf-Trace-Util/
  CC       /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
  LD       /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
  CC       /tmp/build/perf/tests/python-use.o
  CC       /tmp/build/perf/util/scripting-engines/trace-event-python.o
  INSTALL  python-scripts
[acme@five perf]$

[acme@five perf]$ ldd /tmp/build/perf/perf |& grep python
	libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0 (0x00007f11dd1ee000)
[acme@five perf]$ perf -vv |& grep -i python
             libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
[acme@five perf]$

What am I missing?


[acme@five perf]$ cat /etc/redhat-release
Fedora release 31 (Thirty One)
[acme@five perf]$

- Arnaldo

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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-03-25 13:30     ` Arnaldo Carvalho de Melo
@ 2020-03-25 14:40       ` Sam Lunt
  2020-03-25 19:26         ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Sam Lunt @ 2020-03-25 14:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: He Zhe, Jiri Olsa, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung, linux-kernel

On Wed, Mar 25, 2020 at 8:30 AM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu:
> >
> >
> > On 2/17/20 6:22 AM, Jiri Olsa wrote:
> > > On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote:
> > >> From: He Zhe <zhe.he@windriver.com>
> > >>
> > >> Since Python v3.8.0, with the following commit
> > >> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),
> > > we got similar change recently.. might have not been picked up yet
> > >
> > >   https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
> >
> > Thanks for pointing out.
>
> So, just with your patch:
>
> [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
> [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
> ...                     libpython: [ OFF ]
> Makefile.config:750: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev
>   CC       /tmp/build/perf/tests/python-use.o
> [acme@five perf]$
>
> [acme@five perf]$ rpm -q python2-devel python3-devel python-devel
> package python2-devel is not installed
> python3-devel-3.7.6-2.fc31.x86_64
> package python-devel is not installed
> [acme@five perf]$
>
> [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython.make.output
> /bin/sh: --configdir: command not found
> [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython
> test-libpython.make.output          test-libpython-version.make.output
> [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython-version.make.output
> /bin/sh: --configdir: command not found
> [acme@five perf]$
>
>
> Without your patch:
>
> [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
> [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
> ...                     libpython: [ on  ]
>   GEN      /tmp/build/perf/python/perf.so
>   MKDIR    /tmp/build/perf/scripts/python/Perf-Trace-Util/
>   CC       /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
>   LD       /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
>   CC       /tmp/build/perf/tests/python-use.o
>   CC       /tmp/build/perf/util/scripting-engines/trace-event-python.o
>   INSTALL  python-scripts
> [acme@five perf]$
>
> [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python
>         libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0 (0x00007f11dd1ee000)
> [acme@five perf]$ perf -vv |& grep -i python
>              libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
> [acme@five perf]$
>
> What am I missing?

It looks like you are using python3.7, but the change in behavior for
python-config happened in version 3.8

> [acme@five perf]$ cat /etc/redhat-release
> Fedora release 31 (Thirty One)
> [acme@five perf]$
>
> - Arnaldo

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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-03-25 14:40       ` Sam Lunt
@ 2020-03-25 19:26         ` Arnaldo Carvalho de Melo
  2020-03-25 20:31           ` Sam Lunt
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-03-25 19:26 UTC (permalink / raw)
  To: Sam Lunt
  Cc: Arnaldo Carvalho de Melo, He Zhe, Jiri Olsa, peterz, mingo,
	mark.rutland, alexander.shishkin, namhyung, linux-kernel

Em Wed, Mar 25, 2020 at 09:40:34AM -0500, Sam Lunt escreveu:
> On Wed, Mar 25, 2020 at 8:30 AM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu:
> > >
> > >
> > > On 2/17/20 6:22 AM, Jiri Olsa wrote:
> > > > On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote:
> > > >> From: He Zhe <zhe.he@windriver.com>
> > > >>
> > > >> Since Python v3.8.0, with the following commit
> > > >> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),
> > > > we got similar change recently.. might have not been picked up yet
> > > >
> > > >   https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
> > >
> > > Thanks for pointing out.
> >
> > So, just with your patch:
> >
> > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
> > [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
> > ...                     libpython: [ OFF ]
> > Makefile.config:750: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev
> >   CC       /tmp/build/perf/tests/python-use.o
> > [acme@five perf]$
> >
> > [acme@five perf]$ rpm -q python2-devel python3-devel python-devel
> > package python2-devel is not installed
> > python3-devel-3.7.6-2.fc31.x86_64
> > package python-devel is not installed
> > [acme@five perf]$
> >
> > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython.make.output
> > /bin/sh: --configdir: command not found
> > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython
> > test-libpython.make.output          test-libpython-version.make.output
> > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython-version.make.output
> > /bin/sh: --configdir: command not found
> > [acme@five perf]$
> >
> >
> > Without your patch:
> >
> > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
> > [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
> > ...                     libpython: [ on  ]
> >   GEN      /tmp/build/perf/python/perf.so
> >   MKDIR    /tmp/build/perf/scripts/python/Perf-Trace-Util/
> >   CC       /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
> >   LD       /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
> >   CC       /tmp/build/perf/tests/python-use.o
> >   CC       /tmp/build/perf/util/scripting-engines/trace-event-python.o
> >   INSTALL  python-scripts
> > [acme@five perf]$
> >
> > [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python
> >         libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0 (0x00007f11dd1ee000)
> > [acme@five perf]$ perf -vv |& grep -i python
> >              libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
> > [acme@five perf]$
> >
> > What am I missing?
> 
> It looks like you are using python3.7, but the change in behavior for
> python-config happened in version 3.8

Humm, but shouldn't this continue to work with python3.7?

- Arnaldo
 
> > [acme@five perf]$ cat /etc/redhat-release
> > Fedora release 31 (Thirty One)
> > [acme@five perf]$
> >
> > - Arnaldo

-- 

- Arnaldo

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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-03-25 19:26         ` Arnaldo Carvalho de Melo
@ 2020-03-25 20:31           ` Sam Lunt
  2020-03-26  1:06             ` Arnaldo Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Sam Lunt @ 2020-03-25 20:31 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: He Zhe, Jiri Olsa, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung, linux-kernel

On Wed, Mar 25, 2020 at 2:26 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Wed, Mar 25, 2020 at 09:40:34AM -0500, Sam Lunt escreveu:
> > On Wed, Mar 25, 2020 at 8:30 AM Arnaldo Carvalho de Melo
> > <arnaldo.melo@gmail.com> wrote:
> > >
> > > Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu:
> > > >
> > > >
> > > > On 2/17/20 6:22 AM, Jiri Olsa wrote:
> > > > > On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote:
> > > > >> From: He Zhe <zhe.he@windriver.com>
> > > > >>
> > > > >> Since Python v3.8.0, with the following commit
> > > > >> 0a8e57248b91 ("bpo-36721: Add --embed option to python-config (GH-13500)"),
> > > > > we got similar change recently.. might have not been picked up yet
> > > > >
> > > > >   https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
> > > >
> > > > Thanks for pointing out.
> > >
> > > So, just with your patch:
> > >
> > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
> > > [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
> > > ...                     libpython: [ OFF ]
> > > Makefile.config:750: No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev
> > >   CC       /tmp/build/perf/tests/python-use.o
> > > [acme@five perf]$
> > >
> > > [acme@five perf]$ rpm -q python2-devel python3-devel python-devel
> > > package python2-devel is not installed
> > > python3-devel-3.7.6-2.fc31.x86_64
> > > package python-devel is not installed
> > > [acme@five perf]$
> > >
> > > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython.make.output
> > > /bin/sh: --configdir: command not found
> > > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython
> > > test-libpython.make.output          test-libpython-version.make.output
> > > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython-version.make.output
> > > /bin/sh: --configdir: command not found
> > > [acme@five perf]$
> > >
> > >
> > > Without your patch:
> > >
> > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
> > > [acme@five perf]$ make PYTHON=python3 -C tools/perf O=/tmp/build/perf install-bin |& grep python
> > > ...                     libpython: [ on  ]
> > >   GEN      /tmp/build/perf/python/perf.so
> > >   MKDIR    /tmp/build/perf/scripts/python/Perf-Trace-Util/
> > >   CC       /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
> > >   LD       /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
> > >   CC       /tmp/build/perf/tests/python-use.o
> > >   CC       /tmp/build/perf/util/scripting-engines/trace-event-python.o
> > >   INSTALL  python-scripts
> > > [acme@five perf]$
> > >
> > > [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python
> > >         libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0 (0x00007f11dd1ee000)
> > > [acme@five perf]$ perf -vv |& grep -i python
> > >              libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
> > > [acme@five perf]$
> > >
> > > What am I missing?
> >
> > It looks like you are using python3.7, but the change in behavior for
> > python-config happened in version 3.8
>
> Humm, but shouldn't this continue to work with python3.7?

Oh, my mistake, I didn't read the output carefully. It should
obviously still work with old versions, yes. I actually submitted a
similar patch, and it seemed to work when I used python 3.7. I wonder
if the issue is the "||" operator in the subshell.

https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/


> - Arnaldo
>
> > > [acme@five perf]$ cat /etc/redhat-release
> > > Fedora release 31 (Thirty One)
> > > [acme@five perf]$
> > >
> > > - Arnaldo
>
> --
>
> - Arnaldo

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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-03-25 20:31           ` Sam Lunt
@ 2020-03-26  1:06             ` Arnaldo Melo
  2020-03-26 10:33               ` He Zhe
  0 siblings, 1 reply; 13+ messages in thread
From: Arnaldo Melo @ 2020-03-26  1:06 UTC (permalink / raw)
  To: Sam Lunt
  Cc: He Zhe, Jiri Olsa, peterz, mingo, mark.rutland,
	alexander.shishkin, namhyung, linux-kernel



On March 25, 2020 5:31:15 PM GMT-03:00, Sam Lunt <samueljlunt@gmail.com> wrote:
>On Wed, Mar 25, 2020 at 2:26 PM Arnaldo Carvalho de Melo
><arnaldo.melo@gmail.com> wrote:
>>
>> Em Wed, Mar 25, 2020 at 09:40:34AM -0500, Sam Lunt escreveu:
>> > On Wed, Mar 25, 2020 at 8:30 AM Arnaldo Carvalho de Melo
>> > <arnaldo.melo@gmail.com> wrote:
>> > >
>> > > Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu:
>> > > >
>> > > >
>> > > > On 2/17/20 6:22 AM, Jiri Olsa wrote:
>> > > > > On Fri, Feb 14, 2020 at 02:21:05AM +0800,
>zhe.he@windriver.com wrote:
>> > > > >> From: He Zhe <zhe.he@windriver.com>
>> > > > >>
>> > > > >> Since Python v3.8.0, with the following commit
>> > > > >> 0a8e57248b91 ("bpo-36721: Add --embed option to
>python-config (GH-13500)"),
>> > > > > we got similar change recently.. might have not been picked
>up yet
>> > > > >
>> > > > >  
>https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
>> > > >
>> > > > Thanks for pointing out.
>> > >
>> > > So, just with your patch:
>> > >
>> > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p
>/tmp/build/perf
>> > > [acme@five perf]$ make PYTHON=python3 -C tools/perf
>O=/tmp/build/perf install-bin |& grep python
>> > > ...                     libpython: [ OFF ]
>> > > Makefile.config:750: No 'Python.h' (for Python 2.x support) was
>found: disables Python support - please install python-devel/python-dev
>> > >   CC       /tmp/build/perf/tests/python-use.o
>> > > [acme@five perf]$
>> > >
>> > > [acme@five perf]$ rpm -q python2-devel python3-devel python-devel
>> > > package python2-devel is not installed
>> > > python3-devel-3.7.6-2.fc31.x86_64
>> > > package python-devel is not installed
>> > > [acme@five perf]$
>> > >
>> > > [acme@five perf]$ cat
>/tmp/build/perf/feature/test-libpython.make.output
>> > > /bin/sh: --configdir: command not found
>> > > [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython
>> > > test-libpython.make.output         
>test-libpython-version.make.output
>> > > [acme@five perf]$ cat
>/tmp/build/perf/feature/test-libpython-version.make.output
>> > > /bin/sh: --configdir: command not found
>> > > [acme@five perf]$
>> > >
>> > >
>> > > Without your patch:
>> > >
>> > > [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p
>/tmp/build/perf
>> > > [acme@five perf]$ make PYTHON=python3 -C tools/perf
>O=/tmp/build/perf install-bin |& grep python
>> > > ...                     libpython: [ on  ]
>> > >   GEN      /tmp/build/perf/python/perf.so
>> > >   MKDIR    /tmp/build/perf/scripts/python/Perf-Trace-Util/
>> > >   CC      
>/tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
>> > >   LD      
>/tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
>> > >   CC       /tmp/build/perf/tests/python-use.o
>> > >   CC      
>/tmp/build/perf/util/scripting-engines/trace-event-python.o
>> > >   INSTALL  python-scripts
>> > > [acme@five perf]$
>> > >
>> > > [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python
>> > >         libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0
>(0x00007f11dd1ee000)
>> > > [acme@five perf]$ perf -vv |& grep -i python
>> > >              libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
>> > > [acme@five perf]$
>> > >
>> > > What am I missing?
>> >
>> > It looks like you are using python3.7, but the change in behavior
>for
>> > python-config happened in version 3.8
>>
>> Humm, but shouldn't this continue to work with python3.7?
>
>Oh, my mistake, I didn't read the output carefully. It should
>obviously still work with old versions, yes. I actually submitted a
>similar patch, and it seemed to work when I used python 3.7. I wonder
>if the issue is the "||" operator in the subshell.
>
>https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/


I'm aware of your path, even for confused by your comment here, will it try it tomorrow

>
>
>> - Arnaldo
>>
>> > > [acme@five perf]$ cat /etc/redhat-release
>> > > Fedora release 31 (Thirty One)
>> > > [acme@five perf]$
>> > >
>> > > - Arnaldo
>>
>> --
>>
>> - Arnaldo

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

* Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
  2020-03-26  1:06             ` Arnaldo Melo
@ 2020-03-26 10:33               ` He Zhe
  2020-04-04  8:41                 ` [tip: perf/urgent] perf tools: Support Python 3.8+ in Makefile tip-bot2 for Sam Lunt
  0 siblings, 1 reply; 13+ messages in thread
From: He Zhe @ 2020-03-26 10:33 UTC (permalink / raw)
  To: Arnaldo Melo, Sam Lunt
  Cc: Jiri Olsa, peterz, mingo, mark.rutland, alexander.shishkin,
	namhyung, linux-kernel



On 3/26/20 9:06 AM, Arnaldo Melo wrote:
>
> On March 25, 2020 5:31:15 PM GMT-03:00, Sam Lunt <samueljlunt@gmail.com> wrote:
>> On Wed, Mar 25, 2020 at 2:26 PM Arnaldo Carvalho de Melo
>> <arnaldo.melo@gmail.com> wrote:
>>> Em Wed, Mar 25, 2020 at 09:40:34AM -0500, Sam Lunt escreveu:
>>>> On Wed, Mar 25, 2020 at 8:30 AM Arnaldo Carvalho de Melo
>>>> <arnaldo.melo@gmail.com> wrote:
>>>>> Em Mon, Feb 17, 2020 at 10:24:27AM +0800, He Zhe escreveu:
>>>>>>
>>>>>> On 2/17/20 6:22 AM, Jiri Olsa wrote:
>>>>>>> On Fri, Feb 14, 2020 at 02:21:05AM +0800,
>> zhe.he@windriver.com wrote:
>>>>>>>> From: He Zhe <zhe.he@windriver.com>
>>>>>>>>
>>>>>>>> Since Python v3.8.0, with the following commit
>>>>>>>> 0a8e57248b91 ("bpo-36721: Add --embed option to
>> python-config (GH-13500)"),
>>>>>>> we got similar change recently.. might have not been picked
>> up yet
>>>>>>>  
>> https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
>>>>>> Thanks for pointing out.
>>>>> So, just with your patch:
>>>>>
>>>>> [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p
>> /tmp/build/perf
>>>>> [acme@five perf]$ make PYTHON=python3 -C tools/perf
>> O=/tmp/build/perf install-bin |& grep python
>>>>> ...                     libpython: [ OFF ]
>>>>> Makefile.config:750: No 'Python.h' (for Python 2.x support) was
>> found: disables Python support - please install python-devel/python-dev
>>>>>   CC       /tmp/build/perf/tests/python-use.o
>>>>> [acme@five perf]$
>>>>>
>>>>> [acme@five perf]$ rpm -q python2-devel python3-devel python-devel
>>>>> package python2-devel is not installed
>>>>> python3-devel-3.7.6-2.fc31.x86_64
>>>>> package python-devel is not installed
>>>>> [acme@five perf]$
>>>>>
>>>>> [acme@five perf]$ cat
>> /tmp/build/perf/feature/test-libpython.make.output
>>>>> /bin/sh: --configdir: command not found
>>>>> [acme@five perf]$ cat /tmp/build/perf/feature/test-libpython
>>>>> test-libpython.make.output         
>> test-libpython-version.make.output
>>>>> [acme@five perf]$ cat
>> /tmp/build/perf/feature/test-libpython-version.make.output
>>>>> /bin/sh: --configdir: command not found
>>>>> [acme@five perf]$
>>>>>
>>>>>
>>>>> Without your patch:
>>>>>
>>>>> [acme@five perf]$ rm -rf /tmp/build/perf ; mkdir -p
>> /tmp/build/perf
>>>>> [acme@five perf]$ make PYTHON=python3 -C tools/perf
>> O=/tmp/build/perf install-bin |& grep python
>>>>> ...                     libpython: [ on  ]
>>>>>   GEN      /tmp/build/perf/python/perf.so
>>>>>   MKDIR    /tmp/build/perf/scripts/python/Perf-Trace-Util/
>>>>>   CC      
>> /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
>>>>>   LD      
>> /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
>>>>>   CC       /tmp/build/perf/tests/python-use.o
>>>>>   CC      
>> /tmp/build/perf/util/scripting-engines/trace-event-python.o
>>>>>   INSTALL  python-scripts
>>>>> [acme@five perf]$
>>>>>
>>>>> [acme@five perf]$ ldd /tmp/build/perf/perf |& grep python
>>>>>         libpython3.7m.so.1.0 => /lib64/libpython3.7m.so.1.0
>> (0x00007f11dd1ee000)
>>>>> [acme@five perf]$ perf -vv |& grep -i python
>>>>>              libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
>>>>> [acme@five perf]$
>>>>>
>>>>> What am I missing?
>>>> It looks like you are using python3.7, but the change in behavior
>> for
>>>> python-config happened in version 3.8
>>> Humm, but shouldn't this continue to work with python3.7?
>> Oh, my mistake, I didn't read the output carefully. It should
>> obviously still work with old versions, yes. I actually submitted a
>> similar patch, and it seemed to work when I used python 3.7. I wonder
>> if the issue is the "||" operator in the subshell.
>>
>> https://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com/
>
> I'm aware of your path, even for confused by your comment here, will it try it tomorrow

Sorry for inconvenience.

Yes, it is due to that the command before "||" prints some usage on failure and
thus messes up the whole string.

And I've tested Sam's patch. It works.

BTW, my [2/2] may still make sense.


Thanks,
Zhe

>
>>
>>> - Arnaldo
>>>
>>>>> [acme@five perf]$ cat /etc/redhat-release
>>>>> Fedora release 31 (Thirty One)
>>>>> [acme@five perf]$
>>>>>
>>>>> - Arnaldo
>>> --
>>>
>>> - Arnaldo


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

* [tip: perf/urgent] perf tools: Support Python 3.8+ in Makefile
  2020-03-26 10:33               ` He Zhe
@ 2020-04-04  8:41                 ` tip-bot2 for Sam Lunt
  0 siblings, 0 replies; 13+ messages in thread
From: tip-bot2 for Sam Lunt @ 2020-04-04  8:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Sam Lunt, He Zhe, Jiri Olsa, Alexander Shishkin, Mark Rutland,
	Namhyung Kim, Peter Zijlstra, trivial, stable,
	Arnaldo Carvalho de Melo, x86, LKML

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     b9c9ce4e598e012ca7c1813fae2f4d02395807de
Gitweb:        https://git.kernel.org/tip/b9c9ce4e598e012ca7c1813fae2f4d02395807de
Author:        Sam Lunt <samueljlunt@gmail.com>
AuthorDate:    Fri, 31 Jan 2020 12:11:23 -06:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Fri, 03 Apr 2020 10:03:44 -03:00

perf tools: Support Python 3.8+ in Makefile

Python 3.8 changed the output of 'python-config --ldflags' to no longer
include the '-lpythonX.Y' flag (this apparently fixed an issue loading
modules with a statically linked Python executable).  The libpython
feature check in linux/build/feature fails if the Python library is not
included in FEATURE_CHECK_LDFLAGS-libpython variable.

This adds a check in the Makefile to determine if PYTHON_CONFIG accepts
the '--embed' flag and passes that flag alongside '--ldflags' if so.

tools/perf is the only place the libpython feature check is used.

Signed-off-by: Sam Lunt <samuel.j.lunt@gmail.com>
Tested-by: He Zhe <zhe.he@windriver.com>
Link: http://lore.kernel.org/lkml/c56be2e1-8111-9dfe-8298-f7d0f9ab7431@windriver.com
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: trivial@kernel.org
Cc: stable@kernel.org
Link: http://lore.kernel.org/lkml/20200131181123.tmamivhq4b7uqasr@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.config | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index eb95c0c..12a8204 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -228,8 +228,17 @@ strip-libs  = $(filter-out -l%,$(1))
 
 PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
 
+# Python 3.8 changed the output of `python-config --ldflags` to not include the
+# '-lpythonX.Y' flag unless '--embed' is also passed. The feature check for
+# libpython fails if that flag is not included in LDFLAGS
+ifeq ($(shell $(PYTHON_CONFIG_SQ) --ldflags --embed 2>&1 1>/dev/null; echo $$?), 0)
+  PYTHON_CONFIG_LDFLAGS := --ldflags --embed
+else
+  PYTHON_CONFIG_LDFLAGS := --ldflags
+endif
+
 ifdef PYTHON_CONFIG
-  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
+  PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) $(PYTHON_CONFIG_LDFLAGS) 2>/dev/null)
   PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
   PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
   PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --includes 2>/dev/null)

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

* [tip: perf/urgent] perf: Normalize gcc parameter when generating arch errno table
  2020-02-13 18:21 ` [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table zhe.he
  2020-03-25 13:05   ` He Zhe
@ 2020-04-04  8:41   ` tip-bot2 for He Zhe
  1 sibling, 0 replies; 13+ messages in thread
From: tip-bot2 for He Zhe @ 2020-04-04  8:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: He Zhe, Alexander Shishkin, Jiri Olsa, Mark Rutland,
	Namhyung Kim, Peter Zijlstra, Arnaldo Carvalho de Melo, x86,
	LKML

The following commit has been merged into the perf/urgent branch of tip:

Commit-ID:     e4ffd066ff440a57097e9140fa9e16ceef905de8
Gitweb:        https://git.kernel.org/tip/e4ffd066ff440a57097e9140fa9e16ceef905de8
Author:        He Zhe <zhe.he@windriver.com>
AuthorDate:    Fri, 14 Feb 2020 02:21:06 +08:00
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Thu, 26 Mar 2020 11:04:01 -03:00

perf: Normalize gcc parameter when generating arch errno table

The $(CC) passed to arch_errno_names.sh may include a series of parameters
along with gcc itself. To avoid overwriting the following parameters of
arch_errno_names.sh and break the build like below, we just pick up the
first word of the $(CC).

  find: unknown predicate `-m64/arch'
  x86_64-wrs-linux-gcc: warning: '-x c' after last input file has no effect
  x86_64-wrs-linux-gcc: error: unrecognized command line option '-m64/include/uapi/asm-generic/errno.h'
  x86_64-wrs-linux-gcc: fatal error: no input files

Signed-off-by: He Zhe <zhe.he@windriver.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/1581618066-187262-2-git-send-email-zhe.he@windriver.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index a02aca9..d15a311 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -574,7 +574,7 @@ arch_errno_hdr_dir := $(srctree)/tools
 arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
 
 $(arch_errno_name_array): $(arch_errno_tbl)
-	$(Q)$(SHELL) '$(arch_errno_tbl)' $(CC) $(arch_errno_hdr_dir) > $@
+	$(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@
 
 sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
 sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh

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

end of thread, other threads:[~2020-04-04  8:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 18:21 [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags zhe.he
2020-02-13 18:21 ` [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table zhe.he
2020-03-25 13:05   ` He Zhe
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for He Zhe
2020-02-16 22:22 ` [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags Jiri Olsa
2020-02-17  2:24   ` He Zhe
2020-03-25 13:30     ` Arnaldo Carvalho de Melo
2020-03-25 14:40       ` Sam Lunt
2020-03-25 19:26         ` Arnaldo Carvalho de Melo
2020-03-25 20:31           ` Sam Lunt
2020-03-26  1:06             ` Arnaldo Melo
2020-03-26 10:33               ` He Zhe
2020-04-04  8:41                 ` [tip: perf/urgent] perf tools: Support Python 3.8+ in Makefile tip-bot2 for Sam Lunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).