Commit 382cf7b7 authored by Chen Pei's avatar Chen Pei Committed by Paul Walmsley
Browse files

riscv: vdso_cfi: Add clean rule for copied sources



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: default avatarChen Pei <cp0613@linux.alibaba.com>
Link: https://patch.msgid.link/20260320021850.1877-2-cp0613@linux.alibaba.com


Signed-off-by: default avatarPaul Walmsley <pjw@kernel.org>
parent d1f01401
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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))