diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2022-07-11 14:09:23 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-25 11:38:01 +0200 |
commit | 7ef0645ebecfff2d3c2a69a7dd6713a216b73049 (patch) | |
tree | ba8d122167af68ef07812334fdaa3ee2e8123108 /scripts | |
parent | aee18421bda6bf12a7cba6a3d7751c0e1cfd0094 (diff) | |
download | linux-rt-7ef0645ebecfff2d3c2a69a7dd6713a216b73049.tar.gz |
kbuild: dummy-tools: avoid tmpdir leak in dummy gcc
commit aac289653fa5adf9e9985e4912c1d24a3e8cbab2 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: 76426e238834 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dummy-tools/gcc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/dummy-tools/gcc b/scripts/dummy-tools/gcc index 0d0589cf8184..346757a87dbc 100755 --- a/scripts/dummy-tools/gcc +++ b/scripts/dummy-tools/gcc @@ -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 |