From patchwork Mon Mar 15 13:52:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 400475 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3467798jai; Mon, 15 Mar 2021 07:22:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcvufg0dQCG2k2X4L2fOgJcB4dq4prt8WsOC81j/yStPCyT0LU4Uxzc3Kq3485Djsq34nT X-Received: by 2002:a17:906:30da:: with SMTP id b26mr23735096ejb.376.1615817437183; Mon, 15 Mar 2021 07:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615817437; cv=none; d=google.com; s=arc-20160816; b=NuZ7JvbFoc4A6XfSzowCi1/OBFMv6wqYKNssziuyHVO0HcZR0e3GDBlDfEB21lIoOV DLTJ3VrtCtQ7TW6I56NWtiirSmo+YJcqWgqnvBatbEXuZOMeBqmfvMib6kUAOG6qj2Ss WVmx3BmfY8J5eP1JvTiywZiFUwFeT1uCSalzElvJhGrPiaUL0OgrEBl1eX7sfED6ddJH Khmu4v7UfnNNXrSi6pBs7jtqABPbHTOc1pN8N/hnhemfOrNw0Bs6RPxLByGTk27cOYXK ndnTjd96U0sg0iZ/4prKFSP514rNODZFgHv2kwVikZ1+Ho0MFyd7ay7ewCRMF/dlrlT/ 8qSQ== 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=WyqaK6gzYJhJjy/+wb+jPreEXzWXuRHTXHDBKZb0UuM=; b=JrJXiW6eEi8c/RIybc0/M3/BmsiprpWxUqdcSJK33HVmRbSyjw4ZWVDGdbEjjTvcsv XxdYs4B1FGAvd9Vxm+aPeiuzXfzobh9eAqf4YL/j8qdANBE1crc1Z7LTf67yZOlS75VS T0GICHafHAmA4pPHE2N8yM8uRncgCKrQ2kX+Cx9MO3GaXjxm2Hi5E46W+h/WN8KfU75I UuaRupub2Zlf731AcZ5wDz7pk+uccFkS8hW5J7c1G1o+EMYkGqkpaFCsJ6IJDsqZ89tq HI8827EdY+u4/b2XjjIZWqP44my3smKVdVcjHXJlDWhTUcEFhxVZX0KpXst8CDNSbYN/ Wbbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="G3cefF/y"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si993553ede.37.2021.03.15.07.10.36; Mon, 15 Mar 2021 07:10:37 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="G3cefF/y"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S234735AbhCOOE7 (ORCPT + 12 others); Mon, 15 Mar 2021 10:04:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:37836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232138AbhCON6n (ORCPT ); Mon, 15 Mar 2021 09:58:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8BE3064F0C; Mon, 15 Mar 2021 13:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816712; bh=98MF8/ODNy3scW7fgMkNaWKxFbnVN2mLF74ZaQb+7E0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3cefF/yiYVt7eUU0JzUEAr3hHwT3CvWBDCTnLkDzE11RmOoTgMd4jTK4zR34M1eS LLgTCdLQzwTByWG3cR3GU7XaBJtePIJtBZQXZkKrNpN/SmZkzRbE7Wxyj3njIWzFQN 1ZPAVqDDljpqTJj7RFc+i3iAPx+9PlPYsQfTDjJE= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antonio Terceiro , Arnaldo Carvalho de Melo , Alexander Shishkin , He Zhe , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra Subject: [PATCH 5.11 079/306] perf build: Fix ccache usage in $(CC) when generating arch errno table Date: Mon, 15 Mar 2021 14:52:22 +0100 Message-Id: <20210315135510.310941148@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Greg Kroah-Hartman From: Antonio Terceiro commit dacfc08dcafa7d443ab339592999e37bbb8a3ef0 upstream. This was introduced by commit e4ffd066ff440a57 ("perf: Normalize gcc parameter when generating arch errno table"). Assuming the first word of $(CC) is the actual compiler breaks usage like CC="ccache gcc": the script ends up calling ccache directly with gcc arguments, what fails. Instead of getting the first word, just remove from $(CC) any word that starts with a "-". This maintains the spirit of the original patch, while not breaking ccache users. Fixes: e4ffd066ff440a57 ("perf: Normalize gcc parameter when generating arch errno table") Signed-off-by: Antonio Terceiro Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: He Zhe Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20210224130046.346977-1-antonio.terceiro@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -600,7 +600,7 @@ arch_errno_hdr_dir := $(srctree)/tools arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh $(arch_errno_name_array): $(arch_errno_tbl) - $(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@ + $(Q)$(SHELL) '$(arch_errno_tbl)' '$(patsubst -%,,$(CC))' $(arch_errno_hdr_dir) > $@ sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh