Skip to contentSkip to conversation

x86: make 64-bit defconfig the default

PATCH Applied Arnd Bergmann 3 participants 3 messages Feb 15, 2023 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: make 64-bit defconfig the default

From: Arnd Bergmann <[email protected]>

Running 'make ARCH=x86 defconfig' on anything other than an x86_64 machine currently results in a 32-bit build, which is rarely what anyone wants these days.

Change the default so that the 64-bit config gets used unless the user asks for i386_defconfig, uses ARCH=i386 or runs on a system that "uname -m" identifies as i386/i486/i586/i686.

---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/Makefile +3 -3
index a27b27d1418d..cc7efb6e6e6b 100644
@@ -3,10 +3,10 @@
 
 # select defconfig based on actual architecture
 ifeq ($(ARCH),x86)
-  ifeq ($(shell uname -m),x86_64)
-        KBUILD_DEFCONFIG := x86_64_defconfig
-  else
+  ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
         KBUILD_DEFCONFIG := i386_defconfig
+  else
+        KBUILD_DEFCONFIG := x86_64_defconfig
   endif
 else
         KBUILD_DEFCONFIG := $(ARCH)_defconfig
Signature · 1 line
2.39.1
merge bot Applied
#1 lore raw

[tip: x86/build] x86/build: Make 64-bit defconfig the default

The following commit has been merged into the x86/build branch of tip:

The following commit has been merged into the x86/build branch of tip:

Commit-ID:     f9bb7f6a7eb0efd282f7364115f97e652677a29b
Gitweb:        https://git.kernel.org/tip/f9bb7f6a7eb0efd282f7364115f97e652677a29b
Author:        Arnd Bergmann <[email protected]>
AuthorDate:    Wed, 15 Feb 2023 10:16:56 +01:00
Committer:     Ingo Molnar <[email protected]>
CommitterDate: Wed, 15 Feb 2023 14:20:17 +01:00

x86/build: Make 64-bit defconfig the default

Running 'make ARCH=x86 defconfig' on anything other than an x86_64 machine currently results in a 32-bit build, which is rarely what anyone wants these days.

Change the default so that the 64-bit config gets used unless the user asks for i386_defconfig, uses ARCH=i386 or runs on a system that "uname -m" identifies as i386/i486/i586/i686.

---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/Makefile +3 -3
index 73ed982..b399759 100644
@@ -3,10 +3,10 @@
 
 # select defconfig based on actual architecture
 ifeq ($(ARCH),x86)
-  ifeq ($(shell uname -m),x86_64)
-        KBUILD_DEFCONFIG := x86_64_defconfig
-  else
+  ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)
         KBUILD_DEFCONFIG := i386_defconfig
+  else
+        KBUILD_DEFCONFIG := x86_64_defconfig
   endif
 else
         KBUILD_DEFCONFIG := $(ARCH)_defconfig
#2 lore raw
In reply to Arnd Bergmann
Quoted 21 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Running 'make ARCH=x86 defconfig' on anything other than an x86_64 machine currently results in a 32-bit build, which is rarely what anyone wants these days.

Change the default so that the 64-bit config gets used unless the user asks for i386_defconfig, uses ARCH=i386 or runs on a system that "uname -m" identifies as i386/i486/i586/i686.

---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/Makefile +0 -0
index a27b27d1418d..cc7efb6e6e6b 100644

arch/x86/Makefile line 6

Quoted 7 lines
arch/x86/Makefile +1 -3
@@ -3,10 +3,10 @@
 
 # select defconfig based on actual architecture
 ifeq ($(ARCH),x86)
-  ifeq ($(shell uname -m),x86_64)
-        KBUILD_DEFCONFIG := x86_64_defconfig
-  else
+  ifeq ($(shell uname -m | sed -e 's/i.86/i386/'),i386)

I did not test this, but I think

     ifneq ($(shell uname -m | grep 'i.86'),)

is simpler.

     ifneq ($(filter i%86, $(shell uname -m)),)

will also work with less process forks.

Quoted 9 lines
arch/x86/Makefile +2 -1
         KBUILD_DEFCONFIG := i386_defconfig
+  else
+        KBUILD_DEFCONFIG := x86_64_defconfig
   endif
 else
         KBUILD_DEFCONFIG := $(ARCH)_defconfig
--

2.39.1

Signature · 2 lines
Best Regards
Masahiro Yamada