linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix bug with modpost Makefile warn flag inclusion
@ 2014-08-18 20:20 Michael Ton
  2014-08-19  4:35 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Ton @ 2014-08-18 20:20 UTC (permalink / raw)
  To: linux-kbuild

From: Michael Ton <linuxham@gmail.com>

The current Makefile.modpost file includes a warn (-w) flag to modpost 
if KBUILD_EXTMOD or KBUILD_MODPOST_WARN.  This flag should only be added 
if both flags are true.  Whenever KBUILD_MODPOST is true, modpost 
currently only prints warnings and does not exit on error (such as on an 
undefined symbol).

Signed-off-by: Michael Ton <linuxham@gmail.com>
---
--- scripts/Makefile.modpost.orig       2014-08-18 13:18:18.704048707 -0600
+++ scripts/Makefile.modpost    2014-08-18 13:24:20.902520603 -0600
@@ -77,7 +77,7 @@ modpost = scripts/mod/modpost
   $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e 
%,$(KBUILD_EXTRA_SYMBOLS))) \
   $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
   $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S)      \
- $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
+ $(if $(KBUILD_EXTMOD), $(if $(KBUILD_MODPOST_WARN),-w))

  MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: fix bug with modpost Makefile warn flag inclusion
  2014-08-18 20:20 [PATCH] kbuild: fix bug with modpost Makefile warn flag inclusion Michael Ton
@ 2014-08-19  4:35 ` Sam Ravnborg
  0 siblings, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2014-08-19  4:35 UTC (permalink / raw)
  To: Michael Ton; +Cc: linux-kbuild

On Mon, Aug 18, 2014 at 02:20:53PM -0600, Michael Ton wrote:
> From: Michael Ton <linuxham@gmail.com>
> 
> The current Makefile.modpost file includes a warn (-w) flag to modpost if
> KBUILD_EXTMOD or KBUILD_MODPOST_WARN.  This flag should only be added if
> both flags are true.  Whenever KBUILD_MODPOST is true, modpost currently
> only prints warnings and does not exit on error (such as on an undefined
> symbol).

From the documentation:
KBUILD_MODPOST_WARN
--------------------------------------------------
KBUILD_MODPOST_WARN can be set to avoid errors in case of undefined
symbols in the final module linking stage. It changes such errors
into warnings.

Nothing here say that we need KBUILD_EXTMOD to use this.

Why did you conclude that KBUILD_MODPOST_WARN is only relevant for
KBUILD_EXTMOD? Something must have triggerede the patch...


	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: fix bug with modpost Makefile warn flag inclusion
       [not found] <CA+1_+FO=65Hbd1bcTgb6WS4OwdF6W38fyiE1C2rWiU+=s_CHQQ@mail.gmail.com>
@ 2014-08-19  7:00 ` Michal Marek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Marek @ 2014-08-19  7:00 UTC (permalink / raw)
  To: Mike Ton; +Cc: linux-kbuild

On 2014-08-18 21:52, Mike Ton wrote:
> From: Michael Ton <linuxham@gmail.com <mailto:linuxham@gmail.com>>
> 
> The current Makefile.modpost file includes a warn (-w) flag to modpost
> if KBUILD_EXTMOD or KBUILD_MODPOST_WARN.  This flag should only be added
> if both flags are true.

Why?


> Whenever KBUILD_MODPOST is true, modpost
> currently only prints warnings and does not exit on error (such as on an
> undefined symbol).

Yes, that's what Documentation/kbuild/kbuild.txt and the comment at the
beginning of the Makefile say.

Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-19  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-18 20:20 [PATCH] kbuild: fix bug with modpost Makefile warn flag inclusion Michael Ton
2014-08-19  4:35 ` Sam Ravnborg
     [not found] <CA+1_+FO=65Hbd1bcTgb6WS4OwdF6W38fyiE1C2rWiU+=s_CHQQ@mail.gmail.com>
2014-08-19  7:00 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).