mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
kbuild: dummy-tools: avoid tmpdir leak in dummy gcc
When passed -print-file-name=plugin, the dummy gcc script creates a
temporary directory that is never cleaned up. To avoid cluttering
$TMPDIR, instead use a static directory included in the source tree.
Fixes: 76426e2388
("kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig")
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
028062ec22
commit
aac289653f
@ -96,12 +96,8 @@ fi
|
|||||||
|
|
||||||
# To set GCC_PLUGINS
|
# To set GCC_PLUGINS
|
||||||
if arg_contain -print-file-name=plugin "$@"; then
|
if arg_contain -print-file-name=plugin "$@"; then
|
||||||
plugin_dir=$(mktemp -d)
|
# Use $0 to find the in-tree dummy directory
|
||||||
|
echo "$(dirname "$(readlink -f "$0")")/dummy-plugin-dir"
|
||||||
mkdir -p $plugin_dir/include
|
|
||||||
touch $plugin_dir/include/plugin-version.h
|
|
||||||
|
|
||||||
echo $plugin_dir
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user