From patchwork Mon Mar 15 13:52:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 400447 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3443959jai; Mon, 15 Mar 2021 07:00:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZBTcfT2eh0Kauc2oVi27lgY9EK2zzFp5UQpQeSGy0HD8SCmIfH3L8YM/Ykc5rwoJjRkYT X-Received: by 2002:a17:906:25c4:: with SMTP id n4mr23988778ejb.359.1615816840249; Mon, 15 Mar 2021 07:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615816840; cv=none; d=google.com; s=arc-20160816; b=gGYKzto0oEa9dwm8DsRWDORDyvLQ10/Ibs1GS/1mNtXhah2Xj5iWDJqft1/DPcktJZ 1D/mMZ5bKVRHkIVi7FU1HeKqxEaxDdhW+RqFnwADfDUqKfbkMKMMDtuZGjYnOxvHyO6f sOf5AnHRiNVrKkXekIhPbQRJiyQ0m4CJmUyhSEg5eIiEt0BOcAypTrOb0CJiQc5G3aTd W/LBH1iaZNAY4l2DMPkXbLl2zVxIO4/4XqUlE+HVPj2gik8/jfw6EyibD/yqZQhtdQTL j46FIyIroi7Xt3o1p0e/kv9tj1B/0Kr0E5mAu7w70M3dwc0a5RU+qLNoIPcJcgEdLG5K VpwA== 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=rV8cu2ujdwyZ/tDmlPwe4EPZkTuCdnPNyvbyfbzdMRLUQ7OmmEKLRhODrz1DzDvVHA tmJ96MoNuKV82R4cwN+yiYm8st2D4XQzoD74QruK0+1G65ZVXRmgOd+1vu16upTS6+jj dpzHdbYlJ8Z0YmenGjAcveA6cmxWDYGr/oLcfWTVKph+RoyH9lgkzpcwZoQnzuL4j6De NkqZ73tsNv7e29e+jeyT8Zc58TjyeLw5vNeF43WgCRSVQOV+PelFetaV71xw4FRy4F0l p2bWZjhD5owinLqWDZMBBTAZ7H8CXcl5z9P+hEQx1yslQFIZwy2Phz/vNwcqDWldDv4v ztLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dVjXs9Wv; 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 c17si11556720edr.46.2021.03.15.07.00.40; Mon, 15 Mar 2021 07:00:40 -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=dVjXs9Wv; 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 S232720AbhCON7f (ORCPT + 12 others); Mon, 15 Mar 2021 09:59:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:37540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232165AbhCON6Y (ORCPT ); Mon, 15 Mar 2021 09:58:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9544264F4A; Mon, 15 Mar 2021 13:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816703; bh=98MF8/ODNy3scW7fgMkNaWKxFbnVN2mLF74ZaQb+7E0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dVjXs9Wvn23JpbedzeIcYmPwLk7L5NBttdmPrxtyIJeOqYdX98pa9LH8ROm5LRaK/ d1WyIiP+xnfmZUcwMm4JIxRWNXyksJRIpV5/2MMc7qsVsB9DhhjLJ0ytZMSyMnksiW BR0aR2GmdDIixVQyB1LFERE1e6o6XFr3GQmZVPJ4= 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.10 065/290] perf build: Fix ccache usage in $(CC) when generating arch errno table Date: Mon, 15 Mar 2021 14:52:38 +0100 Message-Id: <20210315135544.109381805@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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