Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp837376ybv; Thu, 13 Feb 2020 10:24:12 -0800 (PST) X-Google-Smtp-Source: APXvYqypYK0NPxedBwWK2Funp2Ts60pn7P28IC6OLLCCjG0U6m3PF63mIz9VK916MWDnF3hYmmOp X-Received: by 2002:a05:6830:14c9:: with SMTP id t9mr13709474otq.177.1581618252427; Thu, 13 Feb 2020 10:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581618252; cv=none; d=google.com; s=arc-20160816; b=yViHLUbTQ8a3JM2R2tHKfmp/mZI8sczJHjORnxlqziv0LuKMA/oPhLOlS/QSkD5u2D sru38u3lsrgh5H3TQUms610RcLdUSmJRCtdbUyPWCYbugv8sjEzfCETqIlVVdqUNbQGZ GbMutUafVtWwCKgwhvH97BvcktJIm3p5+xvC+JVew8BzPEVqZjY0Yj2O15utQe6do7We gMrBw2woSwEGpWK4LLQk2H9U5hsswSkd0dJRlX3D0xevQpyL2SLINUwLj8RDQeJO0UgH qoV8f+QtmftE7H+y05JAL7+HzueBtasB669GTcRJWrbDCTz11jUx5UYVlJx9Qw8DmJJb vG/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=4X2HtoBk4BcS4XK+lJezY09D0B4r7vjuTFAlPrTaykE=; b=IJPidFfCHaWlFurQnWQrSxrC/ZxE460t1wQacPd6ompXWx/WVPwAhG6y8X1RXCBSZ+ TSlmDcRtfsnF2yjyEV/3Rg6+sBIALbaXjwyo3P3KdHgArZRrMBQbbYmezsVu5eCkuDQH v+Q4b+186mrHSRxPqKPowWiHYI067iSsCeWdT7WCgy79dOp1SvpHAEKLrV5eM6L2ZNCj GWplQ3g7DXr0it+5uvyG0Z7BL/ZWakc502GKrPSfgs4wbuBBVyO6UDky+/2UjuC+MqvI axPwrmxpUu/7LeZbd/tICPhPT/FKn3Miy2jw4fRMbtrc6TvRbwOv9sistR46VV5AWCcd TLiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si1561254otk.80.2020.02.13.10.24.00; Thu, 13 Feb 2020 10:24:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727998AbgBMSXd (ORCPT + 99 others); Thu, 13 Feb 2020 13:23:33 -0500 Received: from mail5.windriver.com ([192.103.53.11]:53524 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726390AbgBMSXc (ORCPT ); Thu, 13 Feb 2020 13:23:32 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id 01DILNTo025707 (version=TLSv1 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 13 Feb 2020 10:21:33 -0800 Received: from pek-lpg-core2.corp.ad.wrs.com (128.224.153.41) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.468.0; Thu, 13 Feb 2020 10:21:12 -0800 From: To: , , , , , , , , Subject: [PATCH 2/2] perf: Normalize gcc parameter when generating arch errno table Date: Fri, 14 Feb 2020 02:21:06 +0800 Message-ID: <1581618066-187262-2-git-send-email-zhe.he@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1581618066-187262-1-git-send-email-zhe.he@windriver.com> References: <1581618066-187262-1-git-send-email-zhe.he@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: He Zhe 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 --- 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 3eda9d4..7114c11 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -573,7 +573,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)' $(CC) $(arch_errno_hdr_dir) > $@ + $(Q)$(SHELL) '$(arch_errno_tbl)' $(firstword $(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.7.4