All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Antonio Terceiro <antonio.terceiro@linaro.org>
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	He Zhe <zhe.he@windriver.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] perf: fix ccache usage in $(CC) when generating arch errno table
Date: Tue, 2 Mar 2021 09:57:06 -0300	[thread overview]
Message-ID: <YD42IobxI3rym7N0@kernel.org> (raw)
In-Reply-To: <20210224130046.346977-1-antonio.terceiro@linaro.org>

Em Wed, Feb 24, 2021 at 10:00:46AM -0300, Antonio Terceiro escreveu:
> 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.

Thanks, tested, added:

Fixes: e4ffd066ff440a57 ("perf: Normalize gcc parameter when generating arch errno table")

And applied to perf/urgent.

- Arnaldo
 
> Signed-off-by: Antonio Terceiro <antonio.terceiro@linaro.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: He Zhe <zhe.he@windriver.com>
> CC: stable@vger.kernel.org
> ---
>  tools/perf/Makefile.perf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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
> -- 
> 2.30.1
> 

-- 

- Arnaldo

      reply	other threads:[~2021-03-02 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 13:00 [PATCH] perf: fix ccache usage in $(CC) when generating arch errno table Antonio Terceiro
2021-03-02 12:57 ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YD42IobxI3rym7N0@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=antonio.terceiro@linaro.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=zhe.he@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.