lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200216222148.GA161771@krava>
Date:   Sun, 16 Feb 2020 23:22:26 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     zhe.he@...driver.com
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        namhyung@...nel.org, linux-kernel@...r.kernel.org,
        Sam Lunt <samueljlunt@...il.com>
Subject: Re: [PATCH 1/2] perf: Be compatible with all python versions when
 fetching ldflags

On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@...driver.com wrote:
> From: He Zhe <zhe.he@...driver.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@...driver.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ