Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4120736ybv; Sun, 16 Feb 2020 14:26:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzDYFtUqQmJJSGYPLMvNhY7oCfwvwx7WpQjlzqYvlyJfboERott8pyKktiVshABmiqawQyX X-Received: by 2002:a9d:58cb:: with SMTP id s11mr10405983oth.55.1581892009090; Sun, 16 Feb 2020 14:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581892009; cv=none; d=google.com; s=arc-20160816; b=BQT0m4/yhyBmV5szYEBx6uWeQ9tQMGLUgsOn5CmYpDvXu/NRiqPFlCiNEyl13fBZWR +FX1IxlVNIHDiGyFXHaBo8hGxhkZEBhs0UiofgK1HhMrz1GXD3GHY7Im7FRLzuv0CWMR 38YtKPN6908Xwh+M6MoswG9+vlT/tqnrvwqXCSfteRNwksyx8q5TaJU+3btsxZqFrHJ0 PPUfcnE7b82GAdKRXi+j8svbRr/Vv6PHwVFJVk2TA6XlAeqDRIeoWRkREI2xBt2mlPMJ mLc3aslHRL7Pl7/edu4N8GjtrxqwSvECf/74nxucY5Mj8RWTzi4/+17yd3WUQqe2nv5R 2rjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KCOnj8m9+FhlCYw67prMvZclYCf2vCk/0VLIzDQQhnM=; b=dIHBLq2LDC+ocRdzXQh+vUaErN/GrIZSz4TXqjNF76RLmNzqCE46T1lO+ay+hhDBUq iw7DfYkdGKMeX7cii+/Ry3tTWFXuPg9qYzcsQEXFMwRkR65gqxaMmVQ21FLcNBnYz1v5 2xw2i27xEHr6kGhBzw26rNsU1Idiny7EptHCZSOp+FcVoPDXPlQuzgRVPwH1F9coMt1U r86fg+OQ4LQ5YRTox/tZbb3aJqJ3xyuPOSwLet7uTbcYRKr5vyaZaO8zXzp7GZVt3axb 8ahp1uLweNYbAmQ1luJIiVaX3ANK6KaN71yZwmy+Utex1UWSdF7+5cYcGT0pA63AjHJc EE1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ccxpvO9d; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h21si6268486otr.235.2020.02.16.14.26.36; Sun, 16 Feb 2020 14:26:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ccxpvO9d; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbgBPWWm (ORCPT + 99 others); Sun, 16 Feb 2020 17:22:42 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:20881 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726020AbgBPWWm (ORCPT ); Sun, 16 Feb 2020 17:22:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581891761; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KCOnj8m9+FhlCYw67prMvZclYCf2vCk/0VLIzDQQhnM=; b=ccxpvO9d307K67+7OITLMlfuCa9FmYxvQeYiGzPVdgg+KmKGVS0v/YNpHxPP0ClN5BXLhS IehL6AHmr2VZHGTd2wI+5gF6nzY+48sVj7TyVAnBVbr/59ZOiwTnDTv8QRGbqwk95Otdyq DjPRXkbCNWENeb7K9BYM6xwA3fUELz4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-163-pn0V47wPNiGBdvpPIqjs2g-1; Sun, 16 Feb 2020 17:22:33 -0500 X-MC-Unique: pn0V47wPNiGBdvpPIqjs2g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2273613E4; Sun, 16 Feb 2020 22:22:31 +0000 (UTC) Received: from krava (ovpn-204-28.brq.redhat.com [10.40.204.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCEAF19756; Sun, 16 Feb 2020 22:22:28 +0000 (UTC) Date: Sun, 16 Feb 2020 23:22:26 +0100 From: Jiri Olsa To: zhe.he@windriver.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 Subject: Re: [PATCH 1/2] perf: Be compatible with all python versions when fetching ldflags Message-ID: <20200216222148.GA161771@krava> References: <1581618066-187262-1-git-send-email-zhe.he@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1581618066-187262-1-git-send-email-zhe.he@windriver.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 14, 2020 at 02:21:05AM +0800, zhe.he@windriver.com wrote: > From: He Zhe > > 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 > --- > 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 >