From c7e8f01d1124d079ed9827c0d105b8f2d019c802 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 4 Dec 2017 20:56:40 +0000 Subject: [PATCH] ctf: fix thinko preventing linking of out-of-tree modules when CTF is off 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 Reviewed-by: Chuck Anderson Orabug: 27215305 --- scripts/Makefile.modpost | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index c4b6fcd00d88..d4cc4044351e 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -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 -- 2.50.1