Skip to content

Commit dacfc08

Browse files
terceiroacmel
authored andcommitted
perf build: Fix ccache usage in $(CC) when generating arch errno table
This was introduced by commit e4ffd06 ("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: e4ffd06 ("perf: Normalize gcc parameter when generating arch errno table") Signed-off-by: Antonio Terceiro <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: He Zhe <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent b55ff1d commit dacfc08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/Makefile.perf

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ arch_errno_hdr_dir := $(srctree)/tools
607607
arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
608608

609609
$(arch_errno_name_array): $(arch_errno_tbl)
610-
$(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@
610+
$(Q)$(SHELL) '$(arch_errno_tbl)' '$(patsubst -%,,$(CC))' $(arch_errno_hdr_dir) > $@
611611

612612
sync_file_range_arrays := $(beauty_outdir)/sync_file_range_arrays.c
613613
sync_file_range_tbls := $(srctree)/tools/perf/trace/beauty/sync_file_range.sh

0 commit comments

Comments
 (0)