Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 1 Aug 2002 23:15:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 1 Aug 2002 23:15:39 -0400 Received: from chaos.physics.uiowa.edu ([128.255.34.189]:25533 "EHLO chaos.physics.uiowa.edu") by vger.kernel.org with ESMTP id ; Thu, 1 Aug 2002 23:15:38 -0400 Date: Thu, 1 Aug 2002 22:19:04 -0500 (CDT) From: Kai Germaschewski X-X-Sender: kai@chaos.physics.uiowa.edu To: Roman Zippel cc: linux-kernel@vger.kernel.org, Rusty Russell Subject: Re: [PATCH] automatic module_init ordering In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1638 Lines: 45 On Fri, 2 Aug 2002, Roman Zippel wrote: > This is latest version of the automatic module_init ordering patch. > IMO the patch is almost ready. A bit annoying problem is that > -DKBUILD_MODNAME=unix becomes -DKBUILD_MODNAME=1. An undef helps > of course, but I'm not sure whether we should put it on the command > line or in the source. > This patch depends on Kai's KBUILD_MODNAME patch. > Kai, do you see any possible kbuild problem left? I hope I found > everything. :) > + for o in $(sort $(local-objs-y)); do \ > + if [ -n "$$($(OBJDUMP) -h $$o | grep .initcall.module)" ]; then \ > + echo $$o; \ > + fi \ > + done > $@; \ > + for s in $(sort $(subdir-y)); do \ > + sed "s,^,$$s/," < $$s/.builtin_mods; \ > + done >> $@ I had to replace this with for o in `echo $(sort $(local-objs-y))`; do \ and the like, since otherwise my shell (bash) would complain about an empty "for o in ; do". Maybe there's a less hacky way to handle that? BTW, it'd be also nice if scripts/build-initcalls would add some \n's to init/generated-initcalls.c ;) The "unix" thing is stupid. The obvious way around that is -DKBUILD_MODNAME="unix", but unfortunately, I don't know of any "unstringify" preprocessing function, so that doesn't work easily, either. Well, I cannot think of a nicer solution there (and I tried ;), other than these small issues things look very nice, though. --Kai - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/