From patchwork Tue Dec 11 12:01:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10723701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAFA213AF for ; Tue, 11 Dec 2018 12:02:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB1F02A04C for ; Tue, 11 Dec 2018 12:02:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE2E52A1F1; Tue, 11 Dec 2018 12:02:11 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 3E6BD2A04C for ; Tue, 11 Dec 2018 12:02:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726441AbeLKMCK (ORCPT ); Tue, 11 Dec 2018 07:02:10 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:34040 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726251AbeLKMCK (ORCPT ); Tue, 11 Dec 2018 07:02:10 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id wBBC1w9X007779; Tue, 11 Dec 2018 21:01:59 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wBBC1w9X007779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544529719; bh=kPGBEAmLQmzFrcLYi9ojiKRLB9Wyq9h3VzXN/5eBx6c=; h=From:To:Cc:Subject:Date:From; b=KSfC9+z/teATZ6gkP2gsQ03YDIC4ZpEeWPat81iWYKDIPTpclKlpK4jAxlaXTpQDu KIHZ2KWPcvy0PkMcZfbC3pyC01m7yWPCn8yF3pdpGVzYyRcZdGcvvzVmZjcPplo0+0 Yj0N7DZPJ2yYv1pjVqmwx4ZLq51/s7SdYIUXcfrVFGohnBuzu7QxVfRFVRznlOToTR eIiyge03XgiKWI6p7rZ80tjCfZ/TWdyj1E80hkLcp0DIaZTce9sJamary1/r75Dy1M slPg+MlhxnKTPe43fsDpWJk/mtyUr3gz7WsfM07oqNLyLxbHa8KpQKJbtjOhb7+xTE e3rmmI5h0B79Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] kbuild: remove redundant quiet_modtag for $(obj-m) Date: Tue, 11 Dec 2018 21:01:53 +0900 Message-Id: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 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 All objects in $(obj-m) are included in $(real-obj-m) as well. It is true composite objects are only contained in $(obj-m), but [M] is hard-coded in quiet_cmd_link_multi-m. This line is redundant. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6a6be9f..5a4fd82 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -110,8 +110,6 @@ $(real-obj-m:.o=.i) : quiet_modtag := [M] $(real-obj-m:.o=.s) : quiet_modtag := [M] $(real-obj-m:.o=.lst): quiet_modtag := [M] -$(obj-m) : quiet_modtag := [M] - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< From patchwork Tue Dec 11 12:01:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10723707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 895B81751 for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 738EF2A04C for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 681562A1F0; Tue, 11 Dec 2018 12:02:23 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 120A62A1F1 for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726114AbeLKMCW (ORCPT ); Tue, 11 Dec 2018 07:02:22 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:34039 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbeLKMCL (ORCPT ); Tue, 11 Dec 2018 07:02:11 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id wBBC1w9Y007779; Tue, 11 Dec 2018 21:02:00 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wBBC1w9Y007779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544529720; bh=JOz1NbW/eQCO86k0paK1LttJjfqJznbFcoz0vSbQd00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2sk5z57mVCjmkomfBvYnN4HY9u1Z9qK42vbmwRGKzhYsKtgJwuGmA23xdYVI6ozzq 8jn1BL1wYYRV6qjJH4gAJzhxAJ7zhbOfJ6XfhTfEU22Bieg2wajMYd0ugstg1Mi4JH Seb2dPu4MdPq1EIxZ8fiDMWASLtKA9c1HnHGftyTLK10lzhCFhb4oiPVZ8dNprj9hW iL7uKvOV/KGlG8CRYgDXvQe6a9dPbhzPcoac55BxeN3kOVaFjiEpMDVkzHVm13CaEZ n4oXRnonvdHwJzjvGt86gaN0t4OgIeXoKGv5Di3NLM4HgZ/NhSAz6SFRCV5S2lODf4 neT2gk4kQXtbQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] kbuild: refactor quiet_modtag Date: Tue, 11 Dec 2018 21:01:54 +0900 Message-Id: <1544529716-4917-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.com> References: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.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 part-of-module and quiet_modtag are set for the same targets. Define quiet_modtag based on part-of-module. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 5a4fd82..f26ae45 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -98,18 +98,13 @@ modkern_cflags = \ $(if $(part-of-module), \ $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) -quiet_modtag := $(empty) $(empty) +quiet_modtag = $(if $(part-of-module),[M], ) $(real-obj-m) : part-of-module := y $(real-obj-m:.o=.i) : part-of-module := y $(real-obj-m:.o=.s) : part-of-module := y $(real-obj-m:.o=.lst): part-of-module := y -$(real-obj-m) : quiet_modtag := [M] -$(real-obj-m:.o=.i) : quiet_modtag := [M] -$(real-obj-m:.o=.s) : quiet_modtag := [M] -$(real-obj-m:.o=.lst): quiet_modtag := [M] - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< From patchwork Tue Dec 11 12:01:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10723703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C0D113AF for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D85B2A2DC for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E4292A04C; Tue, 11 Dec 2018 12:02:23 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 BB9C32A04C for ; Tue, 11 Dec 2018 12:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbeLKMCL (ORCPT ); Tue, 11 Dec 2018 07:02:11 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:34041 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726400AbeLKMCL (ORCPT ); Tue, 11 Dec 2018 07:02:11 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id wBBC1w9Z007779; Tue, 11 Dec 2018 21:02:00 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wBBC1w9Z007779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544529721; bh=VY6PS7A6EyULkYhFUtP89rFGqR6EiqSvhhdTmpWHtDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AbzUkXpt5AmZw+OJoOEqKY4bbw5I5vvZmwyI0EwanhUct+XIGOlAwH1Ixw+KZkJeE WGp8b5A+Tdo6WipryQjXY3qXwVCotwppQVYv3Et5Rgff5bhoQtN3qlC9g8AC75c34h u+ampOWy/WFByNkDAD9db7dzKzVtI++ZOwdBCUpS9DaugJmHygnAc2z5pPaMpsM85P dV54uPQ3Q9SpGxwnDJDf/c1qSPjltZ3+hO8IwgK9Y3s394a8bBnIqVGAu3f49ZPc7T a2NVy2f9dfATSwSUtRbSSvib01P+mjC4bTmROvHz/N2ZZl+nhPVLaquIMUOa+jdWlp LoSf22sah5qWA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 3/4] kbuild: refactor part-of-module Date: Tue, 11 Dec 2018 21:01:55 +0900 Message-Id: <1544529716-4917-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.com> References: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.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 Use $(foreach ...) to make it shorter. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index f26ae45..321b5b7 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -94,17 +94,15 @@ endif # --------------------------------------------------------------------------- # Default is built-in, unless we know otherwise +$(foreach x, i lst o s, $(patsubst %.o,%.$(x),$(real-obj-m))): \ + part-of-module := y + modkern_cflags = \ $(if $(part-of-module), \ $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) quiet_modtag = $(if $(part-of-module),[M], ) -$(real-obj-m) : part-of-module := y -$(real-obj-m:.o=.i) : part-of-module := y -$(real-obj-m:.o=.s) : part-of-module := y -$(real-obj-m:.o=.lst): part-of-module := y - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< From patchwork Tue Dec 11 12:01:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10723705 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 584F317FE for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 476B92A04C for ; Tue, 11 Dec 2018 12:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B3E72A316; Tue, 11 Dec 2018 12:02:23 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 DBFD02A1F0 for ; Tue, 11 Dec 2018 12:02:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726251AbeLKMCL (ORCPT ); Tue, 11 Dec 2018 07:02:11 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:34042 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbeLKMCL (ORCPT ); Tue, 11 Dec 2018 07:02:11 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id wBBC1w9a007779; Tue, 11 Dec 2018 21:02:01 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com wBBC1w9a007779 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1544529721; bh=pcU+erkhIq5EpFhj6n6ekH67ypKiRSokNmokWp7Wk0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QnxwKuqn65ZDAAJkRsbsw8nuFm8NHD3cIWJjpK00cHKn0syj5pvPVWmmf3tpUQ11t 17wLK1Ke/wQebsxk7544ryDkbVw2m1IS7900pCANQIAfHL7gzWupOLsEO1qyZwjj6u 1PaZvZiK8AIyH+Vb1hSc/ujFC91/XdDDvWZU5pSTlkcvFJIKx7JvsdEq6Q8jARxypE qqZcS8f83oJwCllJxeMqG7mVnVcpHoWF8JrzMihMu80XcY7hdBQeSZcoOmAhLBKZh0 FFWVBWfBXGhAMEmxC54lUuiiNBLQj5RloduMtdTfy6od3mtQX1LN05ETOwOUpt8fbj ZgnetS9dhDqLg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 4/4] kbuild: handle part-of-module correctly for *.ll and *.symtypes Date: Tue, 11 Dec 2018 21:01:56 +0900 Message-Id: <1544529716-4917-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.com> References: <1544529716-4917-1-git-send-email-yamada.masahiro@socionext.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 The single targets *.ll and *.symtypes never treated as a module. Fix this. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 321b5b7..795fedc 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -94,7 +94,7 @@ endif # --------------------------------------------------------------------------- # Default is built-in, unless we know otherwise -$(foreach x, i lst o s, $(patsubst %.o,%.$(x),$(real-obj-m))): \ +$(foreach x, i ll lst o s symtypes, $(patsubst %.o,%.$(x),$(real-obj-m))): \ part-of-module := y modkern_cflags = \