From 3a8d99729fbdaca543392a006fa3168ca09d1b8d Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Wed, 10 Oct 2012 19:30:42 +0100 Subject: [PATCH] ctf: do not build in CTF data for no-longer-built-in modules The module-ctf-flags code in Makefile.modpost uses $(wildcard) to include CTF for all built-in modules (named *.builtin.ctf) inside dtrace_ctf.ko without needing to know what its name is. Unfortunately, if the .config is changed to make a built-in module modular, or to not build it at all, a stale .builtin.ctf file persists, and is built in to dtrace_ctf.ko despite the absence of any module corresponding to it. Since all .builtin.ctf files are regenerated (named .builtin.ctf.new) on every dwarf2ctf run, the solution is to delete .builtin.ctf files without corresponding .new files on every dwarf2ctf run. Signed-off-by: Nick Alcock --- scripts/Makefile.modpost | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 39d05fbb766b..06e7ea8c5d5c 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -171,6 +171,9 @@ $(all-module-ctfs): $(ctf-stamp) $(ctf-stamp): $(builtins) $(modules:.ko=.o) $(call if_changed,ctf) @shopt -s nullglob; \ + for name in $(ctf-dir)/*.builtin.ctf; do \ + [[ -f $${name}.new ]] || rm -f $$name; \ + done; \ for name in $(ctf-dir)/*.ctf.new; do \ scripts/move-if-change $$name $${name%.new}; \ done -- 2.50.1