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
# 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 =
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