From: Nick Alcock Date: Wed, 10 Oct 2012 18:30:42 +0000 (+0100) Subject: ctf: do not build in CTF data for no-longer-built-in modules X-Git-Tag: v4.1.12-92~313^2~110 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3a8d99729fbdaca543392a006fa3168ca09d1b8d;p=users%2Fjedix%2Flinux-maple.git 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 --- 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