]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ctf: fix thinko preventing linking of out-of-tree modules when CTF is off
authorNick Alcock <nick.alcock@oracle.com>
Mon, 4 Dec 2017 20:56:40 +0000 (20:56 +0000)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 4 Dec 2017 23:19:54 +0000 (23:19 +0000)
The CTF decoupling commit dropped a bunch of variable initializations
for the (degenerate) external-module no-CTF case because we would need
the same initializations for other cases, moving those initializations
further up and overriding them only when needed (in the CTF-enabled,
out-of-tree-module case).

Unfortunately I then forgot to move the containing ifdef CONFIG_CTF
down, leading to these variables being entirely unset in the out-
of-tree module case.  This causes linking of out-of-tree modules to fail
when CTF is off.

Thanks to Iain Barker and releng for tracking this down and reporting
it.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Chuck Anderson <chuck.anderson@oracle.com>
Orabug: 27215305

scripts/Makefile.modpost

index c4b6fcd00d881f57a334c33c2049a971f43f6d5a..d4cc4044351ea7b92258d380405cc94755f6a252 100644 (file)
@@ -162,8 +162,6 @@ targets += $(modules:.ko=.mod.o)
 # Step 6), generate CTF for the entire kernel (in a separate $(CTF_FILENAME)),
 # or for the module alone if this is a build of an external module.
 
-ifdef CONFIG_CTF
-
 # These are overridden below for standalone modules only.
 module-ctfs-modular-prereq =
 module-ctfs-modular =
@@ -172,6 +170,8 @@ cmd_touch_ctf =
 ctf-dir = ///.nonexistent
 cmd-touch-ctf = @:
 
+ifdef CONFIG_CTF
+
 # This is quite tricky.  If called for non-external-modules, dwarf2ctf needs to
 # be told about all the built-in objects as well as all the external modules --
 # but Makefile.modpost only knows about the latter.  So the toplevel makefile