mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kbuild: remove srctreie path from CHECK output
@ 2026-06-22 13:26 Ben Dooks
  2026-06-30  2:32 ` Nathan Chancellor
  2026-07-13 12:32 ` Nicolas Schier
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Dooks @ 2026-06-22 13:26 UTC (permalink / raw)
  To: linux-kbuild; +Cc: linux-kernel, Ben Dooks

The build does not put the full kernel path in when
building outputs, so do the same when the check is
run to make the output more consistent.

turn the following:
  CC      arch/riscv/lib/delay.o
  CHECK   /home/ben/linux/arch/riscv/lib/delay.c

into:
  CC      arch/riscv/lib/delay.o
  CHECK   arch/riscv/lib/delay.c

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 scripts/Makefile.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 911745743246..d432693e5367 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -159,10 +159,10 @@ targets += $(targets-for-builtin) $(targets-for-modules)
 
 # Linus' kernel sanity checking tool
 ifeq ($(KBUILD_CHECKSRC),1)
-  quiet_cmd_checksrc       = CHECK   $<
+  quiet_cmd_checksrc       = CHECK   $(patsubst $(srctree)/%,%,$<)
         cmd_checksrc       = $(CHECK) $(CHECKFLAGS) $(c_flags) $<
 else ifeq ($(KBUILD_CHECKSRC),2)
-  quiet_cmd_force_checksrc = CHECK   $<
+  quiet_cmd_force_checksrc = CHECK   $(patsubst $(srctree)/%,%,$<)
         cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $<
 endif
 
-- 
2.37.2.352.g3c44437643


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: remove srctreie path from CHECK output
  2026-06-22 13:26 [PATCH] kbuild: remove srctreie path from CHECK output Ben Dooks
@ 2026-06-30  2:32 ` Nathan Chancellor
  2026-07-13 12:32 ` Nicolas Schier
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2026-06-30  2:32 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-kbuild, linux-kernel

On Mon, 22 Jun 2026 14:26:53 +0100, Ben Dooks <ben.dooks@codethink.co.uk> wrote:

Hi Ben,

There is a typo in the subject.

>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 911745743246..d432693e5367 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -159,10 +159,10 @@ targets += $(targets-for-builtin) $(targets-for-modules)
>  
>  # Linus' kernel sanity checking tool
>  ifeq ($(KBUILD_CHECKSRC),1)
> -  quiet_cmd_checksrc       = CHECK   $<
> +  quiet_cmd_checksrc       = CHECK   $(patsubst $(srctree)/%,%,$<)
>          cmd_checksrc       = $(CHECK) $(CHECKFLAGS) $(c_flags) $<
>  else ifeq ($(KBUILD_CHECKSRC),2)
> -  quiet_cmd_force_checksrc = CHECK   $<
> +  quiet_cmd_force_checksrc = CHECK   $(patsubst $(srctree)/%,%,$<)
>          cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $<
>  endif
>  

I don't have a strong objection to this patch but I know there are
plenty of other places in the build log that will use a full source
path, so this doesn't fully address that inconsistency (and I am not
sure it is inconsistent to begin with, as most build targets are
relative to the build directory whereas files from the source tree have
to be absolute when the build is done outside the tree). But this seems
reasonable enough.

Acked-by: Nathan Chancellor <nathan@kernel.org>

-- 
Cheers,
Nathan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: remove srctreie path from CHECK output
  2026-06-22 13:26 [PATCH] kbuild: remove srctreie path from CHECK output Ben Dooks
  2026-06-30  2:32 ` Nathan Chancellor
@ 2026-07-13 12:32 ` Nicolas Schier
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Schier @ 2026-07-13 12:32 UTC (permalink / raw)
  To: linux-kbuild, Ben Dooks; +Cc: Nicolas Schier, linux-kernel

On Mon, 22 Jun 2026 14:26:53 +0100, Ben Dooks wrote:
> The build does not put the full kernel path in when
> building outputs, so do the same when the check is
> run to make the output more consistent.
> 
> turn the following:
>   CC      arch/riscv/lib/delay.o
>   CHECK   /home/ben/linux/arch/riscv/lib/delay.c
> 
> [...]

Applied to kbuild/linux.git (kbuild-next-unstable), thanks!

[1/1] kbuild: remove srctreie path from CHECK output
      https://git.kernel.org/kbuild/c/fba1a1ac

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers). Patches applied to the
kbuild-next-unstable branch are accepted pending wider testing in
linux-next and any post-commit review; they will generally be moved
to the kbuild-next branch in about a week if no issues are found.

Best regards,
-- 
Nicolas


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-13 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 13:26 [PATCH] kbuild: remove srctreie path from CHECK output Ben Dooks
2026-06-30  2:32 ` Nathan Chancellor
2026-07-13 12:32 ` Nicolas Schier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®