Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3514485pxf; Mon, 15 Mar 2021 11:14:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYhnFOkEmBXN0rx84lpzWZlidccyKH8IVh7Ru+DisI+LudtLR6p2kl1O0ziIVRU4uqTAon X-Received: by 2002:aa7:db15:: with SMTP id t21mr31478125eds.145.1615832040648; Mon, 15 Mar 2021 11:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832040; cv=none; d=google.com; s=arc-20160816; b=HkVhPkWoSZ7Y1m/Nir7Pk/Ch3Xoy6A+jAnQUF732qplRTz3puUFSjJ45XNb+0t36Jq eK0yj/0qGRePYlTvIsuczev0YKcsZABdZdcGeMr5HfSSio6lpi1SRHt/vFEA640493wi Q+2G8gcsWt5kur9WyYTc0aN6YdR+WH9vPPJJ/aoLNFZbRVBagRs1P0vBmY3Ojt34LHwu NtNs0YFKL70qGJjGxTDfTgWiyS4tRsMIMR3igAerTsN0y2LfUEX5Tklv0u1yDC+JWvP8 lWwL7FRIwvgAVarosAv7LZiDGwwaMjXYEGWbGCBnKYNF0h6Jo1iE6kA9Jb9iE/zC2MG2 9hsA== 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=bYU7SCWMF5HbIPmRxqSaPuHFac5k0v/LKE/GO2k8NkFLePxpiLlyHEF3H5RYYQWnb1 8ULB7ShHWJVWtY5i19Pk2qjSmflrkbc/K+2lviQkz58WL1IgZYa1YWZEGuecF2v113R3 20zWhsQI8OLJBlB5EoEcxkIn3MKdPF4gaKgo4pe4X+sTFtBUueqXyI3jrwO7i5FF3dKw X5+N7yHc6K7370NPq6/jg/4tHgfEm2vfubvWwXtgG2s4wnK2Odc7aezsLkjI0qu9QtXq +kDGFXoja4UzhayVE/m9TrGSZ6yZ9jJ88izFCTu92FqNJilLXOJ6U0LeD+iBnXVpBKU+ oxyA== 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 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 u13si11224873ejc.243.2021.03.15.11.13.38; Mon, 15 Mar 2021 11:14:00 -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=dVjXs9Wv; 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 S235958AbhCOOME (ORCPT + 99 others); Mon, 15 Mar 2021 10:12:04 -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 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