kbuild, link-vmlinux: Don't delete output files with make -i
PATCH 1/1 kbuild, link-vmlinux: Don't delete output files with make -i
From: Andi Kleen <[email protected]>
make -i is useful to see output files which normally get deleted on an error. Make this work with link-vmlinux.sh too. Don't delete the output files on error when make -i is used.
--- scripts/link-vmlinux.sh | 5 +++++ 1 file changed, 5 insertions(+)
scripts/link-vmlinux.sh +5 -0
@@ -300,6 +300,11 @@ sorttable() # Delete output files in case of error cleanup() { + # don't delete for make -i + case "$MFLAGS" in + *-i*) return ;; + esac + rm -f .btf.* rm -f .tmp_System.map rm -f .tmp_initcalls.lds
Signature · 1 line
2.25.4
Quoted 29 lines · Andi Kleen
From: Andi Kleen <[email protected]>
make -i is useful to see output files which normally get deleted on an error. Make this work with
link-vmlinux.shtoo. Don't delete the output files on error when make -i is used.Signed-off-by Andi Kleen <[email protected]>--- scripts/link-vmlinux.sh | 5 +++++ 1 file changed, 5 insertions(+)scripts/link-vmlinux.sh +5
-1@@ -300,6 +300,11 @@ sorttable() # Delete output files in case of error cleanup() { + # don't delete for make -i + case "$MFLAGS" in + *-i*) return ;; + esac + rm -f .btf.* rm -f .tmp_System.map rm -f .tmp_initcalls.lds --
Quoted 2 lines
2.25.4
How about removing on_exit() and on_signals() entirely?
.DELETE_ON_ERROR target removes vmlinux on error anyway.
Leaving intermediate files is safe, I think.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 5 lines
How about removing
on_exit()andon_signals()entirely?.DELETE_ON_ERROR target removes vmlinux on error anyway.
Leaving intermediate files is safe, I think.
My guess is it because the tmp vmlinux can be rather big. But makes sense. Build dirs shouldn't be that space constrained.
We just need to make sure make clean cleans them too.
-Andi