Commit 7ef0645e authored by Ondrej Mosnacek's avatar Ondrej Mosnacek Committed by Greg Kroah-Hartman
Browse files

kbuild: dummy-tools: avoid tmpdir leak in dummy gcc

commit aac28965 upstream.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aee18421
linux-5.10.y Tags unavailable
No related merge requests found
Showing with 2 additions and 6 deletions
+2 -6
......@@ -77,12 +77,8 @@ fi
# To set GCC_PLUGINS
if arg_contain -print-file-name=plugin "$@"; then
plugin_dir=$(mktemp -d)
mkdir -p $plugin_dir/include
touch $plugin_dir/include/plugin-version.h
echo $plugin_dir
# Use $0 to find the in-tree dummy directory
echo "$(dirname "$(readlink -f "$0")")/dummy-plugin-dir"
exit 0
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