Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3052257rwe; Mon, 29 Aug 2022 05:11:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR6RTyVdTLgvuL+Z924AcjSnLg/hL2hNtKLtpEm6FzncJixh0eTv6ENlMYpTxIDeR49T82eG X-Received: by 2002:a17:907:781a:b0:730:cd06:3572 with SMTP id la26-20020a170907781a00b00730cd063572mr13469026ejc.487.1661775065373; Mon, 29 Aug 2022 05:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661775065; cv=none; d=google.com; s=arc-20160816; b=OqIu4+BFkwZC6Z57M1krGbGBvjfTYt9N+Zvq4dqQJIe+Dgw5svDIyd4eN+cuQUysQg eCjunOdd7GVfYKA7+pWDNaa4FCgs/H/wLhyGLGvUgRJsaech/GbC+g6Bat6dlHV4lqL/ Jm2XWHXHV06wqQ+CfAm79Jtd5OkPFJiupCTCWgt/A5dsBBzQrwvuUD/UbY/WZfBuK22a TDX/m0Q0C2KDtt7Y3eqOSFfgUMe3cxYQFpq6D9EFxvRJ9rijMrSl5GoXOE6qq4iyAUk6 nVzMpcEIFySUCllj8Nj3bphAyYOQp/S18VZa1HvPc8qwnwBCmyndUvBplPASdJHIhyuX CmkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=roEq6Fc+A3QRocPwyyxu3pRdK72jiVSlHZaYVJCb4T8=; b=YXii7dJSa4wYCP+GFrrmMjUeXTchwsxiuQu+qGSr8YCNX+hWTb81ulychOOaUl/kvh VT0UNu2PM0vZ6jJfUEiFfRsenXzd1IyjrPCdVuvkYqEh305ZPWxI7d2H1wc2bsHEDjWm +cydM6WnL7k70oRNQP1TQszGvEpmfPqz0gFunWJaRQ2+e8bkxunHwQqRIBlvPPCCybwZ 97jR/BBAbBOqsxnCHyyFDH4ekiAd/hit67knYJ9fnHJk18wpAEo7SL1bGrcmxc8Y4MQW s1NZvLHHPEtRfN8BCMpNQrmhN7y+Th5LI0hP7/W9LhB1TdLSZkSat3Vx0YbcK02GiWE9 NTQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="SkuNdpY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w19-20020a170906b19300b007309621c10fsi6080674ejy.699.2022.08.29.05.10.38; Mon, 29 Aug 2022 05:11:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="SkuNdpY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232677AbiH2Ldk (ORCPT + 99 others); Mon, 29 Aug 2022 07:33:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232403AbiH2Lbx (ORCPT ); Mon, 29 Aug 2022 07:31:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 632FA10DC; Mon, 29 Aug 2022 04:18:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CBBF6B80F10; Mon, 29 Aug 2022 11:18:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1E4FC433C1; Mon, 29 Aug 2022 11:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771927; bh=FP+VqXlPhre/IasIJXUAABMMLoWJkKxEbU1x5fRZocU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SkuNdpY/72Uut6qFWcYRem0PmbpL7qP0bboWVrisv6WTNvXaeyPgQk5puA4vtEGTi 3GH5ZRfJujUDM2cCKw+hHOOdFYsF96Z/O46Sq4IPA65CNUcm4ujy4MVZZv9dh/zCi6 uh1mC3Hfm4ynrPbtmbop//31u58OaZG4CuW/iRz0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Clark , Ian Rogers , Alexander Shishkin , Ingo Molnar , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 5.19 143/158] perf python: Fix build when PYTHON_CONFIG is user supplied Date: Mon, 29 Aug 2022 12:59:53 +0200 Message-Id: <20220829105815.089677800@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Clark commit bc9e7fe313d5e56d4d5f34bcc04d1165f94f86fb upstream. The previous change to Python autodetection had a small mistake where the auto value was used to determine the Python binary, rather than the user supplied value. The Python binary is only used for one part of the build process, rather than the final linking, so it was producing correct builds in most scenarios, especially when the auto detected value matched what the user wanted, or the system only had a valid set of Pythons. Change it so that the Python binary path is derived from either the PYTHON_CONFIG value or PYTHON value, depending on what is specified by the user. This was the original intention. This error was spotted in a build failure an odd cross compilation environment after commit 4c41cb46a732fe82 ("perf python: Prefer python3") was merged. Fixes: 630af16eee495f58 ("perf tools: Use Python devtools for version autodetection rather than runtime") Signed-off-by: James Clark Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220728093946.1337642-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -265,7 +265,7 @@ endif # defined. get-executable-or-default fails with an error if the first argument is supplied but # doesn't exist. override PYTHON_CONFIG := $(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON_AUTO)) -override PYTHON := $(call get-executable-or-default,PYTHON,$(subst -config,,$(PYTHON_AUTO))) +override PYTHON := $(call get-executable-or-default,PYTHON,$(subst -config,,$(PYTHON_CONFIG))) grep-libs = $(filter -l%,$(1)) strip-libs = $(filter-out -l%,$(1))