LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org> To: LKML <linux-kernel@vger.kernel.org> Cc: Sam Ravnborg <sam@ravnborg.org> Subject: [PATCH] x86: introduce ARCH=i386,ARCH=x86_64 to select 32/64 bit Date: Sat, 10 Nov 2007 21:43:29 +0100 [thread overview] Message-ID: <11947274090-git-send-email-sam@ravnborg.org> (raw) In-Reply-To: <11947274092719-git-send-email-sam@ravnborg.org> Using the newly added infrastructure is is now simple to add addition ARCH= symbols to select between 32 and 64 bit. Do this for x86. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Makefile | 16 +++++++++++++--- arch/x86/Makefile | 10 +++++++--- scripts/kconfig/Makefile | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 902082b..5efee80 100644 --- a/Makefile +++ b/Makefile @@ -165,8 +165,7 @@ export srctree objtree VPATH TOPDIR # then ARCH is assigned, getting whatever value it gets normally, and # SUBARCH is subsequently ignored. -SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ - -e s/sun4u/sparc64/ \ +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -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/ \ @@ -198,8 +197,19 @@ CROSS_COMPILE ?= UTS_MACHINE := $(ARCH) SRCARCH := $(ARCH) +ifeq ($(ARCH),i386) + K64BIT := n + SRCARCH := x86 +endif +ifeq ($(ARCH),x86_64) + K64BIT := y + SRCARCH := x86 +endif +export K64BIT + + # Sanity check the specified ARCH -ifeq ($(wildcard $(srctree)/arch/$(ARCH)/Kconfig),) +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/Kconfig),) $(error "ERROR: ARCH ($(ARCH)) does not exist (for i386 and x86_64 use ARCH=x86)") endif diff --git a/arch/x86/Makefile b/arch/x86/Makefile index ee94224..feba761 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -1,9 +1,13 @@ # Unified Makefile for i386 and x86_64 # select i386 defconfig file as default config -KBUILD_DEFCONFIG := i386_defconfig - -# # No need to remake these files +ifeq ($(ARCH),x86) + KBUILD_DEFCONFIG := i386_defconfig +else + KBUILD_DEFCONFIG := $(ARCH)_defconfig +endif + +# No need to remake these files $(srctree)/arch/x86/Makefile%: ; ifeq ($(CONFIG_X86_32),y) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 3c9db07..1ad6f7f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -4,7 +4,7 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config -Kconfig := arch/$(ARCH)/Kconfig +Kconfig := arch/$(SRCARCH)/Kconfig xconfig: $(obj)/qconf $< $(Kconfig) -- 1.5.3.4.1157.g0e74-dirty
next prev parent reply other threads:[~2007-11-10 20:42 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-11-10 20:40 [PATCH 0/5] introduce K64BIT=y and backward compatibility ARCH={i386,x86_64} for x86 Sam Ravnborg 2007-11-10 20:43 ` [PATCH] kconfig: factor out code in confdata.c Sam Ravnborg 2007-11-10 20:43 ` [PATCH] kconfig: use $K64BIT to set 64BIT with all*config targets Sam Ravnborg 2007-11-10 20:43 ` [PATCH] x86: Use CONFIG_64BIT to select between 32 and 64 bit in Kconfig Sam Ravnborg 2007-11-10 20:43 ` [PATCH] kconfig: document make K64BIT=y in README Sam Ravnborg 2007-11-10 20:43 ` Sam Ravnborg [this message] 2007-11-10 22:23 ` Randy Dunlap 2007-11-10 22:18 ` [PATCH] x86: Use CONFIG_64BIT to select between 32 and 64 bit in Kconfig Randy Dunlap 2007-11-10 20:55 ` [PATCH] kconfig: use $K64BIT to set 64BIT with all*config targets Guillaume Chazarain 2007-11-11 5:14 ` Adrian Bunk 2007-11-11 12:43 ` Guillaume Chazarain 2007-11-11 13:07 ` Adrian Bunk 2007-11-11 14:59 ` Guillaume Chazarain 2007-11-11 15:30 ` Sam Ravnborg 2007-11-11 15:55 ` Guillaume Chazarain 2007-11-10 22:16 ` Randy Dunlap 2007-11-10 22:31 ` Sam Ravnborg 2007-11-14 20:57 ` Roman Zippel 2007-11-14 22:08 ` Sam Ravnborg 2007-11-15 15:43 ` Roman Zippel 2007-11-15 19:25 ` Sam Ravnborg 2007-11-15 19:43 ` Roman Zippel 2007-11-15 20:45 ` Sam Ravnborg 2007-11-15 21:24 ` Roman Zippel 2007-11-15 22:06 ` Sam Ravnborg 2007-11-16 1:28 ` Roman Zippel 2007-11-16 3:44 ` Randy Dunlap 2007-11-16 13:02 ` Roman Zippel 2007-11-16 5:41 ` Sam Ravnborg 2007-11-16 12:54 ` Roman Zippel 2008-01-06 13:26 ` kconfig: support option env="" [Was: kconfig: use $K64BIT to set 64BIT with all*config targets] Sam Ravnborg 2008-01-14 3:49 ` Roman Zippel 2008-01-14 5:58 ` Sam Ravnborg 2008-01-14 3:50 ` [PATCH 1/3] explicitly introduce expression list Roman Zippel 2008-01-14 3:50 ` [PATCH 2/3] environment symbol support Roman Zippel 2008-01-14 3:51 ` [PATCH 3/3] use environment option Roman Zippel 2007-11-10 22:33 ` [PATCH 0/5] introduce K64BIT=y and backward compatibility ARCH={i386,x86_64} for x86 Randy Dunlap 2007-11-10 22:50 ` Sam Ravnborg 2007-11-11 5:09 ` Adrian Bunk 2007-11-11 11:54 ` Sam Ravnborg 2007-11-12 2:47 ` Roman Zippel 2007-11-12 5:23 ` Sam Ravnborg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=11947274090-git-send-email-sam@ravnborg.org \ --to=sam@ravnborg.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).