> 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/