linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] scripts/nsdeps: use $MODORDER to obtain correct modules.order path
@ 2019-10-28 15:14 Jessica Yu
  2019-10-28 15:14 ` [PATCH 2/4] scripts/nsdeps: don't prepend $srctree if *.mod already contains full paths Jessica Yu
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Jessica Yu @ 2019-10-28 15:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Matthias Maennich, Masahiro Yamada, Jessica Yu

The nsdeps script calls generate_deps() for every module in the
modules.order file. It prepends $objtree to obtain the full path of the
top-level modules.order file. This produces incorrect results when
calling nsdeps for an external module, as only the ns dependencies for
in-tree modules listed in $objtree/modules.order are generated rather
than the ns dependencies for the external module. To fix this, just use
the MODORDER variable provided by kbuild - it uses the correct path for
the relevant modules.order file (either in-tree or the one produced by
the external module build).

Signed-off-by: Jessica Yu <jeyu@kernel.org>
---

So, not being too familiar with kbuild, I am not sure if MODORDER was the
appropriate kbuild variable to use, but I could not find anything else that
gives us the modules.order path. Masahiro, please let me know if this is
appropriate usage.

 scripts/nsdeps | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/nsdeps b/scripts/nsdeps
index dda6fbac016e..54d2ab8f9e5c 100644
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -52,7 +52,7 @@ generate_deps() {
 	done
 }
 
-for f in `cat $objtree/modules.order`; do
+for f in `cat $MODORDER`; do
 	generate_deps $f
 done
 
-- 
2.16.4


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

end of thread, other threads:[~2019-11-05 12:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28 15:14 [PATCH 1/4] scripts/nsdeps: use $MODORDER to obtain correct modules.order path Jessica Yu
2019-10-28 15:14 ` [PATCH 2/4] scripts/nsdeps: don't prepend $srctree if *.mod already contains full paths Jessica Yu
2019-10-29  8:59   ` Masahiro Yamada
2019-10-28 15:14 ` [PATCH 3/4] nsdeps: remove stale .ns_deps files before generating new ones Jessica Yu
2019-10-29 10:45   ` Masahiro Yamada
2019-10-28 15:14 ` [PATCH 4/4] scripts/nsdeps: make sure to pass all module source files to spatch Jessica Yu
2019-10-29 12:57   ` Masahiro Yamada
2019-10-30 16:17     ` Jessica Yu
2019-10-31 12:27       ` Masahiro Yamada
2019-10-31 13:41         ` Jessica Yu
2019-11-01  5:56           ` Masahiro Yamada
2019-11-05 12:52             ` Jessica Yu
2019-11-05 12:57               ` Masahiro Yamada
2019-10-29 12:48 ` [PATCH 1/4] scripts/nsdeps: use $MODORDER to obtain correct modules.order path 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).