Commit-ID: 5a8a2d13b1526e306ff2a9fe12dc9d5878d355f9 Gitweb: http://git.kernel.org/tip/5a8a2d13b1526e306ff2a9fe12dc9d5878d355f9 Author: David Woodhouse <dwmw2@xxxxxxxxxxxxx> AuthorDate: Tue, 30 Jun 2009 12:10:21 +0100 Committer: H. Peter Anvin <hpa@xxxxxxxxx> CommitDate: Thu, 3 Sep 2009 10:57:20 -0700 x86: Don't silently override CONFIG_64BIT in 'make oldconfig' We should not override the setting of CONFIG_64BIT explicitly written in my .config file is overridden with a value of $ARCH inferred from the environment. This patch should fix that, while still allowing defconfig to work as it currently does for both 32-bit and 64-bit environments. An explicit ARCH=i386 and ARCH=x86_64 will operate as previously, forcing the setting of CONFIG_64BIT, but the default is ARCH=x86 which will treat this as a normal convention parameter. The default when running 'make config' is no longer automatic -- it's set to 64-bit. It wasn't possible to preserve this behaviour without also breaking things for the strange people who want 'make randconfig' not to actually be completely random. Signed-off-by: David Woodhouse <David.Woodhouse@xxxxxxxxx> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> Signed-off-by: H. Peter Anvin <hpa@xxxxxxxxx> --- Makefile | 5 +++-- arch/x86/Kconfig | 2 +- arch/x86/Makefile | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0d46615..34f7b0b 100644 --- a/Makefile +++ b/Makefile @@ -152,10 +152,11 @@ export srctree objtree VPATH # SUBARCH tells the usermode build what the underlying arch is. That is set # first, and if a usermode build is happening, the "ARCH=um" on the command # line overrides the setting of ARCH below. If a native build is happening, -# then ARCH is assigned, getting whatever value it gets normally, and +# then ARCH is assigned, getting whatever value it gets normally, and # SUBARCH is subsequently ignored. -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ +SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ + -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 738bdc6..48d3a48 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -4,7 +4,7 @@ mainmenu "Linux Kernel Configuration for x86" # Select 32 or 64 bit config 64BIT bool "64-bit kernel" if ARCH = "x86" - default ARCH = "x86_64" + default ARCH != "i386" ---help--- Say yes to build a 64-bit kernel - formerly known as x86_64 Say no to build a 32-bit kernel - formerly known as i386 diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 1f3851a..8867604 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -2,7 +2,11 @@ # select defconfig based on actual architecture ifeq ($(ARCH),x86) + ifeq ($(shell uname -m),x86_64) + KBUILD_DEFCONFIG := x86_64_defconfig + else KBUILD_DEFCONFIG := i386_defconfig + endif else KBUILD_DEFCONFIG := $(ARCH)_defconfig endif -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html