Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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>

authored by

Ondrej Mosnacek and committed by
Masahiro Yamada
aac28965 028062ec

+2 -6
scripts/dummy-tools/dummy-plugin-dir/include/plugin-version.h
+2 -6
scripts/dummy-tools/gcc
··· 96 96 97 97 # To set GCC_PLUGINS 98 98 if arg_contain -print-file-name=plugin "$@"; then 99 - plugin_dir=$(mktemp -d) 100 - 101 - mkdir -p $plugin_dir/include 102 - touch $plugin_dir/include/plugin-version.h 103 - 104 - echo $plugin_dir 99 + # Use $0 to find the in-tree dummy directory 100 + echo "$(dirname "$(readlink -f "$0")")/dummy-plugin-dir" 105 101 exit 0 106 102 fi 107 103