Skip to content

Commit fd7e5de

Browse files
tzussmanEric Biggers
authored andcommitted
lib/crypto: ensure generated *.S files are removed on make clean
make clean does not check the kernel config when removing files. As such, additions to clean-files under CONFIG_ARM or CONFIG_ARM64 are not evaluated. For example, when building on arm64, this means that lib/crypto/arm64/sha{256,512}-core.S are left over after make clean. Set clean-files unconditionally to ensure that make clean removes these files. Fixes: e96cb95 ("lib/crypto: sha256: Consolidate into single module") Fixes: 24c91b6 ("lib/crypto: arm/sha512: Migrate optimized SHA-512 code to library") Fixes: 60e3f1e ("lib/crypto: arm64/sha512: Migrate optimized SHA-512 code to library") Signed-off-by: Tal Zussman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
1 parent d73915f commit fd7e5de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/crypto/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,13 @@ ifeq ($(CONFIG_ARM),y)
100100
libsha256-y += arm/sha256-ce.o arm/sha256-core.o
101101
$(obj)/arm/sha256-core.S: $(src)/arm/sha256-armv4.pl
102102
$(call cmd,perlasm)
103-
clean-files += arm/sha256-core.S
104103
AFLAGS_arm/sha256-core.o += $(aflags-thumb2-y)
105104
endif
106105

107106
ifeq ($(CONFIG_ARM64),y)
108107
libsha256-y += arm64/sha256-core.o
109108
$(obj)/arm64/sha256-core.S: $(src)/arm64/sha2-armv8.pl
110109
$(call cmd,perlasm_with_args)
111-
clean-files += arm64/sha256-core.S
112110
libsha256-$(CONFIG_KERNEL_MODE_NEON) += arm64/sha256-ce.o
113111
endif
114112

@@ -132,15 +130,13 @@ ifeq ($(CONFIG_ARM),y)
132130
libsha512-y += arm/sha512-core.o
133131
$(obj)/arm/sha512-core.S: $(src)/arm/sha512-armv4.pl
134132
$(call cmd,perlasm)
135-
clean-files += arm/sha512-core.S
136133
AFLAGS_arm/sha512-core.o += $(aflags-thumb2-y)
137134
endif
138135

139136
ifeq ($(CONFIG_ARM64),y)
140137
libsha512-y += arm64/sha512-core.o
141138
$(obj)/arm64/sha512-core.S: $(src)/arm64/sha2-armv8.pl
142139
$(call cmd,perlasm_with_args)
143-
clean-files += arm64/sha512-core.S
144140
libsha512-$(CONFIG_KERNEL_MODE_NEON) += arm64/sha512-ce-core.o
145141
endif
146142

@@ -167,3 +163,7 @@ obj-$(CONFIG_PPC) += powerpc/
167163
obj-$(CONFIG_RISCV) += riscv/
168164
obj-$(CONFIG_S390) += s390/
169165
obj-$(CONFIG_X86) += x86/
166+
167+
# clean-files must be defined unconditionally
168+
clean-files += arm/sha256-core.S arm/sha512-core.S
169+
clean-files += arm64/sha256-core.S arm64/sha512-core.S

0 commit comments

Comments
 (0)