Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3046040rwe; Mon, 29 Aug 2022 05:05:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5g35jPMQVAcC5MhdBHt+ac72TyUPDf2VAbAbp/7hwmzmlRPRJNL+BkPBt5DUvkHboEwa6K X-Received: by 2002:a05:6402:34cb:b0:448:9fac:20a0 with SMTP id w11-20020a05640234cb00b004489fac20a0mr1245003edc.160.1661774758681; Mon, 29 Aug 2022 05:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661774758; cv=none; d=google.com; s=arc-20160816; b=KodKdlqLU/O/FrUYcaf6yQL5S9jxsiwt5C9WA8BtjcSRjZG8aRPP/ZSSEqpJcA4HQp muSdpfsmAPURo3K/WSm9PdFj7Q8IEXXGzmaeuYfkh+W7cbAthDL4jVx94jl5IZxhFAKD 6QMxdRcnnhNHZcUslJRbvWf4atQqbeS8eyTDjxbJH4MS+OabXCDEWNNySZsLLLqYZy0f qqnNd+xXCi0/qU1iLB/tedF2J3tV6u8Eso2HdYZvKg0rBsLoKZ/yZ0kOcAalV/BN0pjU 1GcY+D+gUA0TJ5K/7IyvQwZmyGc0Hl3Sbtlp58hr3pCqeMiDRT7Mm26kzgKJQtdhTYHy ebBQ== 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=tUZDRqBEkMS/1q0cpuGQ+Ek4nQ7XFpF2DAlkt+HVZWo=; b=TYlkx+g4s0balCwNK/xtf6jHEcT1VOs/aHO519dsicfxpzP7TPjG9m5CdcDrp/9BwS gRMoBWw0Ds94ITBHwJJ2s9pDWqkd6Inda01jBxuFIJ+rn/1Lab4stbHTqPhqO/BO/wVr EppNDbrfNrPLmgqbjRhEoz+USzJcllrDLlUNZkXjU/Z5PrfEPBOTyBeOTTJ4rtPbEVqE 7zEkDjd1/siV8LgeYC2HJtdo/MO45iDVbOGj4d9tC0T53Mdv4Cxm0QeD+wFzjFNTtVuZ qMudlzkmJGeOK8gO3SbKpoC9MJL+0kknLIxixvzIRTfX+SFTPRfQLf4CC0ktSfLctHw/ DW4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YFJJ6lAb; 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 dp20-20020a170906c15400b007262ad8839esi7185364ejc.16.2022.08.29.05.05.32; Mon, 29 Aug 2022 05:05:58 -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=YFJJ6lAb; 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 S231688AbiH2LVG (ORCPT + 99 others); Mon, 29 Aug 2022 07:21:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231831AbiH2LT0 (ORCPT ); Mon, 29 Aug 2022 07:19:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B81A1117E; Mon, 29 Aug 2022 04:13:12 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 01ACE61228; Mon, 29 Aug 2022 11:13:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9747C433C1; Mon, 29 Aug 2022 11:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771582; bh=SnbJ+6NkH4rpT9T12sHrdeFOzjthET33klZwQgtz3mY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YFJJ6lAbwZULKLVcc4/vvS7E1oZ47OMLMUrZZdrX9z8OZVj6IhXoKj/rONGxbhff9 CJhuzczjTiNj3nVGS77KqGUPm/pOmjYAABZgucTu5c+5mvM0d+VjuVlZhrfM4UpFHB Uc7z62wwfW2fyeyyjpq2V1fJR/xP3f5f+b4rM9B0= 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.10 82/86] perf python: Fix build when PYTHON_CONFIG is user supplied Date: Mon, 29 Aug 2022 12:59:48 +0200 Message-Id: <20220829105759.877832785@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105756.500128871@linuxfoundation.org> References: <20220829105756.500128871@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 @@ -248,7 +248,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))