From patchwork Wed Nov 1 01:43:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao jin X-Patchwork-Id: 10035827 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 97FAA600C5 for ; Wed, 1 Nov 2017 01:44:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 817D028B0F for ; Wed, 1 Nov 2017 01:44:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73AB828B2D; Wed, 1 Nov 2017 01:44:57 +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 F154F28B0F for ; Wed, 1 Nov 2017 01:44:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754076AbdKABo4 (ORCPT ); Tue, 31 Oct 2017 21:44:56 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:28188 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753486AbdKABoz (ORCPT ); Tue, 31 Oct 2017 21:44:55 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29791187" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Nov 2017 09:44:54 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 150C14818488; Wed, 1 Nov 2017 09:44:52 +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:44:49 +0800 From: Cao jin To: , CC: , Subject: [PATCH v2] kbuild: comments correction & update on Makefile.host Date: Wed, 1 Nov 2017 09:43:14 +0800 Message-ID: <20171101014314.4575-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: 150C14818488.A7F28 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..8181df66d764 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-cobjs and host-cxxobjs notation host-objdirs := $(dir $(__hostprogs) $(host-cobjs) $(host-cxxobjs)) host-objdirs := $(strip $(sort $(filter-out ./,$(host-objdirs))))