Skip to content

Commit e4ffd06

Browse files
He Zheacmel
authored andcommitted
perf: Normalize gcc parameter when generating arch errno table
The $(CC) passed to arch_errno_names.sh may include a series of parameters along with gcc itself. To avoid overwriting the following parameters of arch_errno_names.sh and break the build like below, we just pick up the first word of the $(CC). find: unknown predicate `-m64/arch' x86_64-wrs-linux-gcc: warning: '-x c' after last input file has no effect x86_64-wrs-linux-gcc: error: unrecognized command line option '-m64/include/uapi/asm-generic/errno.h' x86_64-wrs-linux-gcc: fatal error: no input files Signed-off-by: He Zhe <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 2a3d252 commit e4ffd06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/Makefile.perf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ arch_errno_hdr_dir := $(srctree)/tools
574574
arch_errno_tbl := $(srctree)/tools/perf/trace/beauty/arch_errno_names.sh
575575

576576
$(arch_errno_name_array): $(arch_errno_tbl)
577-
$(Q)$(SHELL) '$(arch_errno_tbl)' $(CC) $(arch_errno_hdr_dir) > $@
577+
$(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(CC)) $(arch_errno_hdr_dir) > $@
578578

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

0 commit comments

Comments
 (0)