* [PATCH] kbuild: remove .thinlto-cache by 'make clean'
@ 2021-02-25 19:39 Masahiro Yamada
2021-02-25 20:02 ` Kees Cook
2021-02-25 20:37 ` Kees Cook
0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2021-02-25 19:39 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Sami Tolvanen, Masahiro Yamada, Kees Cook, Michal Marek
'make clean' should remove build artifacts unneeded by external module
builds. Obviously, you do not need to keep this directory.
Fixes: dc5723b02e52 ("kbuild: add support for Clang LTO")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index b18dbc634690..8601a86ebe38 100644
--- a/Makefile
+++ b/Makefile
@@ -1501,7 +1501,7 @@ endif # CONFIG_MODULES
# Directories & files removed with 'make clean'
CLEAN_FILES += include/ksym vmlinux.symvers \
modules.builtin modules.builtin.modinfo modules.nsdeps \
- compile_commands.json
+ compile_commands.json .thinlto-cache
# Directories & files removed with 'make mrproper'
MRPROPER_FILES += include/config include/generated \
@@ -1515,7 +1515,7 @@ MRPROPER_FILES += include/config include/generated \
*.spec
# Directories & files removed with 'make distclean'
-DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS .thinlto-cache
+DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
# clean - Delete most, but leave enough to build external modules
#
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: remove .thinlto-cache by 'make clean'
2021-02-25 19:39 [PATCH] kbuild: remove .thinlto-cache by 'make clean' Masahiro Yamada
@ 2021-02-25 20:02 ` Kees Cook
2021-02-25 20:37 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2021-02-25 20:02 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild, linux-kernel, Sami Tolvanen, Michal Marek
On Fri, Feb 26, 2021 at 04:39:12AM +0900, Masahiro Yamada wrote:
> 'make clean' should remove build artifacts unneeded by external module
> builds. Obviously, you do not need to keep this directory.
As in, it should exist in the "clean" target, rather than "distclean"?
>
> Fixes: dc5723b02e52 ("kbuild: add support for Clang LTO")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
That works for me!
Reviewed-by: Kees Cook <keescook@chromium.org>
-Kees
> ---
>
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b18dbc634690..8601a86ebe38 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1501,7 +1501,7 @@ endif # CONFIG_MODULES
> # Directories & files removed with 'make clean'
> CLEAN_FILES += include/ksym vmlinux.symvers \
> modules.builtin modules.builtin.modinfo modules.nsdeps \
> - compile_commands.json
> + compile_commands.json .thinlto-cache
>
> # Directories & files removed with 'make mrproper'
> MRPROPER_FILES += include/config include/generated \
> @@ -1515,7 +1515,7 @@ MRPROPER_FILES += include/config include/generated \
> *.spec
>
> # Directories & files removed with 'make distclean'
> -DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS .thinlto-cache
> +DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
>
> # clean - Delete most, but leave enough to build external modules
> #
> --
> 2.27.0
>
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: remove .thinlto-cache by 'make clean'
2021-02-25 19:39 [PATCH] kbuild: remove .thinlto-cache by 'make clean' Masahiro Yamada
2021-02-25 20:02 ` Kees Cook
@ 2021-02-25 20:37 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2021-02-25 20:37 UTC (permalink / raw)
To: linux-kbuild, Masahiro Yamada
Cc: Kees Cook, Sami Tolvanen, linux-kernel, Michal Marek
On Fri, 26 Feb 2021 04:39:12 +0900, Masahiro Yamada wrote:
> 'make clean' should remove build artifacts unneeded by external module
> builds. Obviously, you do not need to keep this directory.
Applied to kspp/clang-lto, thanks!
[1/1] kbuild: Move .thinlto-cache removal to 'make clean'
https://git.kernel.org/kees/c/4c7858b9001c
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-25 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 19:39 [PATCH] kbuild: remove .thinlto-cache by 'make clean' Masahiro Yamada
2021-02-25 20:02 ` Kees Cook
2021-02-25 20:37 ` Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).