Commit aac28965 authored by Ondrej Mosnacek's avatar Ondrej Mosnacek Committed by Masahiro Yamada

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: 76426e23 ("kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig")
Signed-off-by: default avatarOndrej Mosnacek <omosnace@redhat.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 028062ec
...@@ -96,12 +96,8 @@ fi ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment