From patchwork Wed Feb 24 13:00:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Terceiro X-Patchwork-Id: 386861 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp385774jap; Wed, 24 Feb 2021 05:45:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCR7W96J0qhz7zYzqm1Uz2jxlw0vuAZqUJdWYYk4zx4t3bEeVnkStZ6gfs9SRDmKucCkqu X-Received: by 2002:aa7:da0c:: with SMTP id r12mr24834568eds.362.1614174320585; Wed, 24 Feb 2021 05:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614174320; cv=none; d=google.com; s=arc-20160816; b=fXBDTU38xPZJxLoAGCCnkFhc93k5XcLxSVAeWFc6zy+6EJqI+/zUfbfTQGrqUR05lD IwKdJ8wqj/aTR8k+AFxApLKTmg7iCelSSlE4gxcMmCBbIyYrRhX+gJ0kqz2gfqitn3/3 2Oqy+bK+ZsGu6fRrpR6iCi1lLA5zamZLkKeaJRGxSFLKUAEWBTBEyiL73xrNCv/JKdxY RKm19MW/c88DglTqJg/d3WVnJbIqmVRsbkdEq7ZS70JOcpLxAPFe0WgRFmip+Xc+E0vs p9VzcOytXcTI7TTCySVZT2tm+dT0q2sRaeE10MDmEbHuJnex9LMzCFPExdCgS1qb6Bgn V31g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Hz6BWGl7qa7h/rRrM/u0WCVRkmbtUFWO0Cr4wwVxXjY=; b=cVAkr8jCMJHan4SaNJ+wgvFUeDsl8KM2ieqWm6VTejiW+34Y2Z/UKfDXM4n9276rtl C6aWFC0bRqf1A1XubA+L0DfkpwlWa7HSpguZs1qOMdRgeV/Y2AGGd3/rAPf2CRA0UrFP mViWAw9x6XWjzcg/f3N0Et73rVgY2di0Z50L/t9ecJ2yy+2IPvuEr91d09KrCubTCiYn xA2pSt4RRi5sTrcnh2tILBxMmYramjP/Z0TAc6LPfmmoGjpQcKJAAFOvbOuA44079hVh fSn61jqmu4b/kd9fMKE29l1mkvYz+0mzHxPBkp9TWVJsTLMeR5WwWtKQAoCZUs2ACdD3 /15A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wr+r6Gd6; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si1171813edj.442.2021.02.24.05.45.20; Wed, 24 Feb 2021 05:45:20 -0800 (PST) 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=@linaro.org header.s=google header.b=Wr+r6Gd6; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232536AbhBXN0v (ORCPT + 13 others); Wed, 24 Feb 2021 08:26:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235403AbhBXNT4 (ORCPT ); Wed, 24 Feb 2021 08:19:56 -0500 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68755C0617A9 for ; Wed, 24 Feb 2021 05:18:33 -0800 (PST) Received: by mail-ot1-x32c.google.com with SMTP id b16so2113740otq.1 for ; Wed, 24 Feb 2021 05:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Hz6BWGl7qa7h/rRrM/u0WCVRkmbtUFWO0Cr4wwVxXjY=; b=Wr+r6Gd6YiIT1RvRDMDejiuUXKyYgtB2MpoPj2b3REeXwS40+RrCjZUkwACLoxf4gT o/rd+peXH6NGy7ycvrW70vh8mQurSQ/vf+UMMP76QGzUIz1Pi2kWv8rzW8VtAg1Dee7L vyz3DndX9AuiBZgEYka2INaLRiEWG2EtSKVpz3YAkcynhPoftCHahRAyncfPSDHwOeW5 XAiKbA7+VyGED1P7TFv1qLzL862DrDR1hbfdhloNhb6vcV52ldsNWrFtoggj9scep0pM 5JVPjjg8yfHJZz0h8N+X2c8yyHEZro/iAVijjJOCxfyMKfsoXdiHmt41njDkst7xY33l dCiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Hz6BWGl7qa7h/rRrM/u0WCVRkmbtUFWO0Cr4wwVxXjY=; b=QhgdGDkZQuxqzErELr/ltPJxVD31WdwgiPg9h/+nnh2OhATwtmTcOi2tmrO6BrVLJO GE7ORL6oYfKv+mkKeZcKLwpSVSxad4WQWm37xsB2cnxTzjBc9OeRrs2yAO2e6WSDxtio JDf0WQ1hH/GuAoUO8a+HCUJF4m2U8Gdz3OuHBZ42oDxNQolDtKYbefrjuDucuK7GPjfc C7SXU+EF5nS8A0BioFLQ5eCFYl06sVcDyW1bTKPmcK+e10G3n/ejt031fv2StTtzP86U MMdhGyFRqpq1Xk0zrhxlkiQHCLN4tS1OxMfRrBp8YTaVfxxIzSo7rQZmQ7ivyb7V2CMD 1PTQ== X-Gm-Message-State: AOAM531sZ081xEIGdoHXpc06Q3u9gzdxeK8JGwsxcx8G1peBugGj3TR2 7YjTgCl8eALvn/PgrNvgOZbPNA== X-Received: by 2002:a9d:6958:: with SMTP id p24mr12470520oto.297.1614172712725; Wed, 24 Feb 2021 05:18:32 -0800 (PST) Received: from winterfell.papolivre.org (winterfell.papolivre.org. [2600:3c00::f03c:91ff:fe69:3960]) by smtp.gmail.com with ESMTPSA id w4sm378114ool.44.2021.02.24.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 05:18:32 -0800 (PST) Received: from localhost (unknown [IPv6:2001:1284:f016:4cfd:27e0:441e:870:6787]) by winterfell.papolivre.org (Postfix) with ESMTPSA id 1C7821C2F43; Wed, 24 Feb 2021 10:18:30 -0300 (-03) From: Antonio Terceiro To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , He Zhe , stable@vger.kernel.org Subject: [PATCH] perf: fix ccache usage in $(CC) when generating arch errno table Date: Wed, 24 Feb 2021 10:00:46 -0300 Message-Id: <20210224130046.346977-1-antonio.terceiro@linaro.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This was introduced by commit e4ffd066ff440a57097e9140fa9e16ceef905de8. 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. Signed-off-by: Antonio Terceiro Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: He Zhe CC: stable@vger.kernel.org --- tools/perf/Makefile.perf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.1 diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 5345ac70cd83..9bfc725db608 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -607,7 +607,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