Re: [PATCH v10 3/3] kbuild: distributed build support for Clang ThinLTO

From: Nathan Chancellor

Date: Wed May 27 2026 - 20:58:44 EST


On Tue, 26 May 2026 10:29:26 -0700, xur@xxxxxxxxxx <xur@xxxxxxxxxx> wrote:
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 0718e39cedda..b36c7c6817bd 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -249,6 +249,12 @@ ifdef CONFIG_LTO_CLANG
> cmd_ld_single = $(if $(objtool-enabled)$(is-single-obj-m), ; $(LD) $(ld_flags) -r -o $(tmp-target) $@; mv $(tmp-target) $@)
> endif
>
> +ifdef CONFIG_LTO_CLANG_THIN_DIST
> +# Save the _c_flags, sliently.
> +quiet_cmd_save_c_flags =
> + cmd_save_c_flags = printf '\n%s\n' 'saved_c_flags_$@ := $(call escsq,$(_c_flags))' >> $(dot-target).cmd

Sashiko notes that we might want modkern_cflags here as well, which
seems like it could really matter for LoongArch?

https://sashiko.dev/#/patchset/25040?part=3

The other comments might be relevant too but I did not look too closely
as I am wrapping up my day but I wanted to bring this to your attention
sooner rather than later.

--
Cheers,
Nathan