Re: [PATCH 18/28] kbuild: fail kernel compilation in case of unresolved module symbols
From: Sam Ravnborg
Date: Sun Sep 24 2006 - 18:31:58 EST
On Sun, Sep 24, 2006 at 11:20:26PM +0100, Al Viro wrote:
> On Sun, Sep 24, 2006 at 11:18:14PM +0200, sam@xxxxxxxxxxxx wrote:
> > From: Kirill Korotaev <dev@xxxxxxxxxx>
> > At stage 2 modpost utility is used to check modules. In case of unresolved
> > symbols modpost only prints warning.
> > IMHO it is a good idea to fail compilation process in case of unresolved
> > symbols (at least in modules coming with kernel), since usually such errors
> > are left unnoticed, but kernel modules are broken.
> > - new option '-w' is added to modpost:
> > if option is specified, modpost only warns about unresolved symbols
> > - modpost is called with '-w' for external modules in Makefile.modpost
> Oh, joy... Could you add a way to tell kbuild that old behaviour is,
> in fact, desired? make MODPOST_FLAGS=-w or something along these lines...
On what architectures do you see lots of these warnings - maybe fixable?
Otherwise I could do something like this:
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 4b2721c..e9efe61 100644
@@ -58,7 +58,7 @@ quiet_cmd_modpost = MODPOST $(words $(fi
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
- $(if $(KBUILD_EXTMOD),-w) \
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
$(wildcard vmlinux) $(filter-out FORCE,$^)
PHONY += __modpost
would warn and not fail.
Note: I beleive the patch has been in -mm for a while.
Got the patch via akpm
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/