From: Yang Wang <kevinyang.wang@amd.com>
To: <linux-kbuild@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<amd-gfx@lists.freedesktop.org>
Cc: <nathan@kernel.org>, <nsc@kernel.org>
Subject: [PATCH] kbuild: normalize paths in quiet compile output
Date: Mon, 8 Jun 2026 15:00:39 +0800 [thread overview]
Message-ID: <20260608070039.4069917-1-kevinyang.wang@amd.com> (raw)
Composite objects may contain relative components in their member object
paths. This can make quiet compile output include noisy dot-dot components,
for example:
CC [M] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_module.o
Use the existing normalize_path helper for quiet C and assembly compile
output so the same target is printed as:
CC [M] drivers/gpu/drm/amd/amdkfd/kfd_module.o
The actual compile commands still use $@, so object paths, dependency
tracking and generated files are unchanged.
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
---
scripts/Makefile.lib | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 28a1c08e3b22..7d1589d993a8 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -239,7 +239,7 @@ 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
-quiet_cmd_cc_o_c = CC $(quiet_modtag) $@
+quiet_cmd_cc_o_c = CC $(quiet_modtag) $(call normalize_path,$@)
cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< \
$(cmd_ld_single) \
$(cmd_objtool)
@@ -254,7 +254,7 @@ define rule_cc_o_c
$(call cmd,warn_shared_object)
endef
-quiet_cmd_as_o_S = AS $(quiet_modtag) $@
+quiet_cmd_as_o_S = AS $(quiet_modtag) $(call normalize_path,$@)
cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< $(cmd_objtool)
define rule_as_o_S
--
2.47.3
next reply other threads:[~2026-06-08 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 7:00 Yang Wang [this message]
2026-06-08 22:08 ` Nathan Chancellor
2026-06-09 1:28 ` Wang, Yang(Kevin)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260608070039.4069917-1-kevinyang.wang@amd.com \
--to=kevinyang.wang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®