From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754077AbYIVPuj (ORCPT ); Mon, 22 Sep 2008 11:50:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753044AbYIVPub (ORCPT ); Mon, 22 Sep 2008 11:50:31 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50818 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbYIVPua (ORCPT ); Mon, 22 Sep 2008 11:50:30 -0400 Date: Mon, 22 Sep 2008 17:50:28 +0200 Message-ID: From: Takashi Iwai To: Steven Rostedt Cc: "Giacomo A. Catenazzi" , Chris Li , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: Re: diet-kconfig: a script to trim unneeded kconfigs In-Reply-To: References: <20080918122541.2c3c7b39@areia.chehab.org> <48D27734.3040600@cateee.net> <48D36D02.4090003@cateee.net> <70318cbf0809191655m89e4b4fo68c3693487afed98@mail.gmail.com> <48D79FFD.1060102@cateee.net> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.2 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Mon, 22 Sep 2008 11:41:36 -0400 (EDT), Steven Rostedt wrote: > > > > On Mon, 22 Sep 2008, Giacomo A. Catenazzi wrote: > > Takashi Iwai wrote: > > > At Fri, 19 Sep 2008 16:55:51 -0700, > > > Chris Li wrote: > > > > > > > I avoid arch/ and firmware/ because it is nasty. I figure module in > > > > arch/ is small enough I don't mind building it. And the firmware > > > > directory, > > > > if I don't build the module loads it. Those firmware will automatically > > > > skipped > > > > any way. > > > > > > Agreed. > > > > > > > The little tricky part is some thing like this: > > > > ======================== > > > > ifeq ($(CONFIG_BLK_DEV_CMD640), m) > > > > obj-m += cmd640.o > > > > endif > > > > ======================== > > > > Internally it get convert it into: > > > > "obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o" > > > > Are you sure? > > I.e. if you set CONFIG_BLK_DEV_CMD640=y, you see that > > the two constructs gives different results. > > > > If the makefile author did such complex construct, I > > really think there is a reason ;-) > > > > Yes indeed, we should find out what the author meant. > > ifeq ($(CONFIG_BLK_DEV_CMD640), m) > obj-m += cmd640.o > endif > > and > > obj-$(CONFIG_BLK_DEV_CMD640) += cmd640.o > > mean two different things. > > The former means to compile the cmd640 only if it is set to a module. > The later means to compile the cmd640 if it is either a module or built > into the core kernel code. FYI, in this particular case, cmd640.o is linked in the upper Makefile for CONFIG_BLK_DEV_CMD640=y. > The author needs to make this change or explain why it is like this. Right. My guess is the link order, but still there must be a better way to fix. thanks, Takashi