linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: He Zhe <zhe.he@windriver.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
	<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
	<namhyung@kernel.org>, <linux-kernel@vger.kernel.org>,
	Sam Lunt <samueljlunt@gmail.com>
Subject: Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags
Date: Mon, 17 Feb 2020 10:24:27 +0800	[thread overview]
Message-ID: <8cc46abf-208d-4aa4-8d0d-4922106bee6e@windriver.com> (raw)
In-Reply-To: <20200216222148.GA161771@krava>



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
>>


  reply	other threads:[~2020-02-17  4:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8cc46abf-208d-4aa4-8d0d-4922106bee6e@windriver.com \
    --to=zhe.he@windriver.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=samueljlunt@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).