From: cp0613@linux.alibaba.com
To: pjw@kernel.org, alex@ghiti.fr, debug@rivosinc.com, guoren@kernel.org
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Chen Pei <cp0613@linux.alibaba.com>
Subject: [PATCH 1/2] riscv: vdso_cfi: Add clean rule for copied sources
Date: Fri, 20 Mar 2026 10:18:49 +0800 [thread overview]
Message-ID: <20260320021850.1877-2-cp0613@linux.alibaba.com> (raw)
In-Reply-To: <20260320021850.1877-1-cp0613@linux.alibaba.com>
From: Chen Pei <cp0613@linux.alibaba.com>
When building VDSO with CFI support, source files are copied from the main
VDSO directory to the CFI build directory as part of the build process.
However, these copied source files were not removed during 'make clean',
leaving temporary files in the build directory.
Add the clean-files variable to ensure that these copied .c and .S files
are properly cleaned up. The notdir() function is used to strip the path
prefix, as clean-files expects relative file names without directory
components.
This ensures the build directory is left in a clean state after make clean.
Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
---
arch/riscv/kernel/vdso_cfi/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/riscv/kernel/vdso_cfi/Makefile b/arch/riscv/kernel/vdso_cfi/Makefile
index 8ebd190782b0..10292498b765 100644
--- a/arch/riscv/kernel/vdso_cfi/Makefile
+++ b/arch/riscv/kernel/vdso_cfi/Makefile
@@ -23,3 +23,6 @@ $(vdso_c_objects): $(obj)/%.c: $(src)/%.c
# Include the main VDSO Makefile which contains all the build rules and sources
# The VDSO_CFI_BUILD variable will be passed to it to enable CFI compilation
include $(src)/Makefile
+
+# Clean rules - remove the copied source files
+clean-files += $(notdir $(vdso_c_sources)) $(notdir $(vdso_S_sources))
--
2.50.1
next prev parent reply other threads:[~2026-03-20 2:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 2:18 [PATCH 0/2] riscv: vdso_cfi build cleanup improvements cp0613
2026-03-20 2:18 ` cp0613 [this message]
2026-03-20 2:18 ` [PATCH 2/2] riscv: vdso_cfi: Add .gitignore for build artifacts cp0613
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=20260320021850.1877-2-cp0613@linux.alibaba.com \
--to=cp0613@linux.alibaba.com \
--cc=alex@ghiti.fr \
--cc=debug@rivosinc.com \
--cc=guoren@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=pjw@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