All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: make 64-bit defconfig the default
@ 2023-02-15  9:16 Arnd Bergmann
  2023-02-15 13:28 ` [tip: x86/build] x86/build: Make " tip-bot2 for Arnd Bergmann
  2023-02-15 16:54 ` [PATCH] x86: make " Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-02-15  9:16 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86
  Cc: Arnd Bergmann, H. Peter Anvin, Peter Zijlstra, Nathan Chancellor,
	Masahiro Yamada, Nicolas Schier, Miguel Ojeda, Nick Desaulniers,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index a27b27d1418d..cc7efb6e6e6b 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -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.39.1


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

* [tip: x86/build] x86/build: Make 64-bit defconfig the default
  2023-02-15  9:16 [PATCH] x86: make 64-bit defconfig the default Arnd Bergmann
@ 2023-02-15 13:28 ` tip-bot2 for Arnd Bergmann
  2023-02-15 16:54 ` [PATCH] x86: make " Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2023-02-15 13:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Arnd Bergmann, Ingo Molnar, x86, linux-kernel

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 <arnd@arndb.de>
AuthorDate:    Wed, 15 Feb 2023 10:16:56 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230215091706.1623070-1-arnd@kernel.org
---
 arch/x86/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 73ed982..b399759 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -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

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

* Re: [PATCH] x86: make 64-bit defconfig the default
  2023-02-15  9:16 [PATCH] x86: make 64-bit defconfig the default Arnd Bergmann
  2023-02-15 13:28 ` [tip: x86/build] x86/build: Make " tip-bot2 for Arnd Bergmann
@ 2023-02-15 16:54 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2023-02-15 16:54 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	Arnd Bergmann, H. Peter Anvin, Peter Zijlstra, Nathan Chancellor,
	Nicolas Schier, Miguel Ojeda, Nick Desaulniers, linux-kernel

On Wed, Feb 15, 2023 at 6:17 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/x86/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index a27b27d1418d..cc7efb6e6e6b 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -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.






>          KBUILD_DEFCONFIG := i386_defconfig
> +  else
> +        KBUILD_DEFCONFIG := x86_64_defconfig
>    endif
>  else
>          KBUILD_DEFCONFIG := $(ARCH)_defconfig
> --
> 2.39.1
>


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2023-02-15 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15  9:16 [PATCH] x86: make 64-bit defconfig the default Arnd Bergmann
2023-02-15 13:28 ` [tip: x86/build] x86/build: Make " tip-bot2 for Arnd Bergmann
2023-02-15 16:54 ` [PATCH] x86: make " Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.