Skip to contentSkip to conversation

Add CONFIG_BITS to remove the test in arch/x86/Makefile

RFC PATCH In review Loic Grenie 2 participants 2 messages Nov 26, 2007 x86

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 Add CONFIG_BITS to remove the test in arch/x86/Makefile

I propose the following patch to arch/x86/Makefile and Kconfig.

Actions:

- Add a BITS variable to Kconfig which takes value 32 or 64 according to 64BIT.
- Modify arch/x86/Makefile to use CONFIG_BITS instead of testing ARCH.

How this could be expanded:

- Either remove BITS from arch/x86/Makefile_?? or change its definition (I expect to do one of those if my patch is accepted).
- Add it to other arhitectures ? Maybe CONFIG_BITS could be useful somewhere in the code ?

Kindly,

Lo�c Greni�

---
 arch/x86/Kconfig  |    5 +++++
 arch/x86/Makefile |    9 ++-------
 2 files changed, 7 insertions(+), 7 deletions(-)
arch/x86/Kconfig +5 -0
index 368864d..c0935fd 100644
@@ -15,6 +15,11 @@ config X86_32
 config X86_64
 	def_bool 64BIT
 
+config BITS
+	int
+	default "64" if 64BIT
+	default "32"
+
 ### Arch settings
 config X86
 	bool
arch/x86/Makefile +2 -7
index 116b03a..035adba 100644
@@ -10,11 +10,6 @@ endif
 # No need to remake these files
 $(srctree)/arch/x86/Makefile%: ;
 
-ifeq ($(CONFIG_X86_32),y)
-        include $(srctree)/arch/x86/Makefile_32
-else
-        include $(srctree)/arch/x86/Makefile_64
-endif
-
-
+CONFIG_BITS ?= 32
 
+include $(srctree)/arch/x86/Makefile_$(CONFIG_BITS)
Signature · 1 line
1.5.3.4
#1 lore raw
Quoted 7 lines · On Mon, 26 Nov 2007 14:36:07 +0100 Loic Grenie <[email protected]> wrote:

I propose the following patch to arch/x86/Makefile and Kconfig.

Actions:

- Add a BITS variable to Kconfig which takes value 32 or 64 according to 64BIT.

Linus' suggestion was WORD_SIZE and that is what we have already used in powerpc.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/