From patchwork Wed Nov 1 01:31:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao jin X-Patchwork-Id: 10035813 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D3DA2603B5 for ; Wed, 1 Nov 2017 01:32:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C360D28920 for ; Wed, 1 Nov 2017 01:32:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B599E28B2B; Wed, 1 Nov 2017 01:32:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 493B028920 for ; Wed, 1 Nov 2017 01:32:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753875AbdKABcQ (ORCPT ); Tue, 31 Oct 2017 21:32:16 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:7640 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754005AbdKABcQ (ORCPT ); Tue, 31 Oct 2017 21:32:16 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29790807" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Nov 2017 09:32:14 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id BEA3C4818492; Wed, 1 Nov 2017 09:32:15 +0800 (CST) Received: from G08FNSTD140223.g08.fujitsu.local (10.167.226.60) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 1 Nov 2017 09:32:13 +0800 From: Cao jin To: , CC: , Subject: [PATCH] kbuild: comments correction & update Date: Wed, 1 Nov 2017 09:31:35 +0800 Message-ID: <20171101013135.3989-1-caoj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: BEA3C4818492.ACA59 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP host-cmulti means the composite host program that is compiled/linked from several .c file, not .o file, because .o file could also be compiled from .cpp file. Bonus: update the stale comment. Signed-off-by: Cao jin --- scripts/Makefile.host | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 9cfd5c84d76f..103a4bec4ba5 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -25,11 +25,11 @@ host-cshlib := $(sort $(hostlibs-y) $(hostlibs-m)) host-cxxshlib := $(sort $(hostcxxlibs-y) $(hostcxxlibs-m)) # C code -# Executables compiled from a single .c file +# C Executables compiled from a single .c file host-csingle := $(foreach m,$(__hostprogs), \ $(if $($(m)-objs)$($(m)-cxxobjs),,$(m))) -# C executables linked based on several .o files +# C executables compiled from several .c files, and only .c files host-cmulti := $(foreach m,$(__hostprogs),\ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) @@ -50,7 +50,7 @@ host-cxxshobjs := $(sort $(foreach m,$(host-cxxshlib),$($(m:.so=-objs)))) # output directory for programs/.o files # hostprogs-y := tools/build may have been specified. -# Retrieve also directory of .o files from prog-objs or prog-cxxobjs notation +# Retrieve also directory of .o files from host-objs or host-cxxobjs notation host-objdirs := $(dir $(__hostprogs) $(host-cobjs) $(host-cxxobjs)) host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs))))