Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3525059pxf; Mon, 15 Mar 2021 11:29:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8C1YRLpGdpa6feS0AqINzZ7KpqE7N1uH+MOtI/VGXmYRa4+DpWmgBGWX2FpHaMibXdihW X-Received: by 2002:a05:6402:1c86:: with SMTP id cy6mr30995975edb.276.1615832972703; Mon, 15 Mar 2021 11:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832972; cv=none; d=google.com; s=arc-20160816; b=Ih4zAgo9XMOxKctkQAjXhJDOF91/GlXdcKn18Oy9mkgiE6Tm5hp1pamidSmpP/KCfY 5oYc2CNrMRrYBGk/ofKDLH4KIPl995Jme6yCQYsfAR6bAWPCP15K6p2vCTp8FtWcdaAS sy380TQxkJLRcZy8+0M97lkRBcPLCIrUfli7kmCQlg62c+3eWHS/2rJiUmcjH/kHT6jN t2G2i7PMBDBBpdMVu+AKoj5Rh8J2I81lDwK4vd0sFYR+jinQbJUy2Yt8uucg5U9R7Izg UawwNtT/gRg0KwJX8RvD0w9OLTkrI5PLxt/AwfrAq/EJH1vdfuUOS/cKiZxkHAd+Fcj6 Etqg== 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=Benvm0J40+W88/cxl37ZiQeQgckma6JV3l+iYLIyVXUkr7EgxQKYcIBdOnehBPI+hB yfLww7JHNNhG3lpXZPJalA9amzOyIZFkkCkil8IxK2CGzgVwfnzkDiUBcCztbx8Z/Tiw 212NZ6sf5t5yObMOaBMHGMOJqpO29zPQEMF1dwlma0+Ejjdc6lU2pc2VG0/KEXCBUx3C yJ2NQFheL05t5b8YO2v6a6nI6j7qcH3j28vu/+bAVvrXRDpGM+raIPw/jZNPbenanGv3 KSjVQ/hvvJ/f7nVPbro18BBFPKC/p8fmwBL+ryQ8n2q9fLmmUHKE2BVsSP6sZTEzs4op 5UiA== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ka21si11882811ejc.323.2021.03.15.11.29.05; Mon, 15 Mar 2021 11:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235382AbhCOOaW (ORCPT + 99 others); Mon, 15 Mar 2021 10:30:22 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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