Linux kbuild/kconfig development
 help / color / mirror / Atom feed
* [PATCH] kbuild: improve sanity check for ARCH variable on x86
@ 2026-10-20  0:17 Cao Jin
  2026-10-20  0:36 ` Nathan Chancellor
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Cao Jin @ 2026-10-20  0:17 UTC (permalink / raw)
  To: nathan, nsc; +Cc: linux-kbuild, Cao Jin

When building for x86, ARCH=i{4,5,6}86 and x86_32 will fail the build.
Make it catch all name variants.
---
 Makefile | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 7c855e6fe544..cd397027891a 100644
--- a/Makefile
+++ b/Makefile
@@ -409,12 +409,10 @@ ARCH		?= $(SUBARCH)
 UTS_MACHINE 	:= $(ARCH)
 SRCARCH 	:= $(ARCH)
 
-# Additional ARCH settings for x86
-ifeq ($(ARCH),i386)
-        SRCARCH := x86
-endif
-ifeq ($(ARCH),x86_64)
-        SRCARCH := x86
+# Additional sanity check for cmdline ARCH settings for x86. This catch
+# more name variants than "i386" and "x86_64".
+ifneq ($(findstring 86,$(ARCH)),)
+    SRCARCH := x86
 endif
 
 # Additional ARCH settings for sparc
-- 
2.55.0


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

end of thread, other threads:[~2026-10-21  0:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20  0:17 [PATCH] kbuild: improve sanity check for ARCH variable on x86 Cao Jin
2026-10-20  0:36 ` Nathan Chancellor
2026-10-20  0:59   ` Borislav Petkov
2026-10-20  1:26     ` Cao Jin
2026-10-20  1:33   ` Cao Jin
2026-10-20  1:39     ` Randy Dunlap
2026-10-20  1:38 ` Randy Dunlap
2026-10-20  1:51   ` Cao Jin
2026-10-21  0:17 ` sashiko-bot

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