]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ctf: do not build in CTF data for no-longer-built-in modules
authorNick Alcock <nick.alcock@oracle.com>
Wed, 10 Oct 2012 18:30:42 +0000 (19:30 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:40:34 +0000 (22:40 +0100)
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 <nick.alcock@oracle.com>
scripts/Makefile.modpost

index 39d05fbb766b0d76cc464752686475ce6875d06b..06e7ea8c5d5cb8aa7e5e3ad37c9163e760d3040d 100644 (file)
@@ -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