linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] modpost: make KBUILD_MODPOST_WARN also configurable for external modules
@ 2019-04-11  9:25 Wiebe, Wladislav (Nokia - DE/Ulm)
  2019-04-11 14:23 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Wiebe, Wladislav (Nokia - DE/Ulm) @ 2019-04-11  9:25 UTC (permalink / raw)
  To: Masahiro Yamada, michal.lkml, linux-kbuild, Jonas Gorski; +Cc: linux-kernel

Commit ea837f1c0503 ("kbuild: make modpost processing configurable")
was intended to give KBUILD_MODPOST_WARN flexibility to be configurable.
Right now KBUILD_MODPOST_WARN gets just ignored when KBUILD_EXTMOD is
set which happens per default when building modules out of the tree.

This change gives the opportunity to define module build behaving also
in case of out of tree builds and default will become exit on error.
Errors which can be detected by the build should be trapped out of the box
there, unless somebody wants to notice broken stuff later at runtime.

As this patch changes the default behaving from warning to error,
users can consider to fix it for external module builds by:
- providing module symbol table via KBUILD_EXTRA_SYMBOLS for
  modules which are dependent
- OR getting old behaving back by passing KBUILD_MODPOST_WARN to the build

Signed-off-by: Wladislav Wiebe <wladislav.wiebe@nokia.com>
---
 scripts/Makefile.modpost | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 6b7f354f189a..fec6ec2ffa47 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -78,7 +78,7 @@ modpost = scripts/mod/modpost                    \
  $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
  $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
  $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)  \
- $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
+ $(if $(KBUILD_MODPOST_WARN),-w)
 
 MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))
 
-- 
2.19.2

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

* Re: [PATCH v3] modpost: make KBUILD_MODPOST_WARN also configurable for external modules
  2019-04-11  9:25 [PATCH v3] modpost: make KBUILD_MODPOST_WARN also configurable for external modules Wiebe, Wladislav (Nokia - DE/Ulm)
@ 2019-04-11 14:23 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-04-11 14:23 UTC (permalink / raw)
  To: Wiebe, Wladislav (Nokia - DE/Ulm)
  Cc: michal.lkml, linux-kbuild, Jonas Gorski, linux-kernel

On Thu, Apr 11, 2019 at 6:25 PM Wiebe, Wladislav (Nokia - DE/Ulm)
<wladislav.wiebe@nokia.com> wrote:
>
> Commit ea837f1c0503 ("kbuild: make modpost processing configurable")
> was intended to give KBUILD_MODPOST_WARN flexibility to be configurable.
> Right now KBUILD_MODPOST_WARN gets just ignored when KBUILD_EXTMOD is
> set which happens per default when building modules out of the tree.
>
> This change gives the opportunity to define module build behaving also
> in case of out of tree builds and default will become exit on error.
> Errors which can be detected by the build should be trapped out of the box
> there, unless somebody wants to notice broken stuff later at runtime.
>
> As this patch changes the default behaving from warning to error,
> users can consider to fix it for external module builds by:
> - providing module symbol table via KBUILD_EXTRA_SYMBOLS for
>   modules which are dependent
> - OR getting old behaving back by passing KBUILD_MODPOST_WARN to the build
>
> Signed-off-by: Wladislav Wiebe <wladislav.wiebe@nokia.com>


Applied to linux-kbuild.
Thanks.


> ---
>  scripts/Makefile.modpost | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index 6b7f354f189a..fec6ec2ffa47 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -78,7 +78,7 @@ modpost = scripts/mod/modpost                    \
>   $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
>   $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
>   $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)  \
> - $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w)
> + $(if $(KBUILD_MODPOST_WARN),-w)
>
>  MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))
>
> --
> 2.19.2



-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2019-04-11 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11  9:25 [PATCH v3] modpost: make KBUILD_MODPOST_WARN also configurable for external modules Wiebe, Wladislav (Nokia - DE/Ulm)
2019-04-11 14:23 ` Masahiro Yamada

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).