aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-10-23 16:37:23 -0400
committerThomas Gleixner <tglx@linutronix.de>2007-10-23 16:37:23 -0400
commitbec2c48c2045ca467d07bba54783318b8672bda7 (patch)
tree69eb8e5051feb08235fd1a0cd7bba202e967e2e0
parent428c5a2339f6d59e3b2d59e9b878b95e6f7a09d7 (diff)
x86: Add BITS to allow simple Makefile sharing
Preperatory patch to simplify the sharing of Makefiles in arch/x86. Linus came up with this during a discussion about the ugliness of ifeq($CONFIG_X86_32),y) and obj-$(CONFIG_X86_32) in the shared Makefiles. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/i386/Makefile6
-rw-r--r--arch/x86_64/Makefile6
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index b81cb64d48e5..f5b9a37def8b 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -20,6 +20,12 @@
20# Fill in SRCARCH 20# Fill in SRCARCH
21SRCARCH := x86 21SRCARCH := x86
22 22
23# BITS is used as extension for files which are available in a 32 bit
24# and a 64 bit version to simplify shared Makefiles.
25# e.g.: obj-y += foo_$(BITS).o
26BITS := 32
27export BITS
28
23HAS_BIARCH := $(call cc-option-yn, -m32) 29HAS_BIARCH := $(call cc-option-yn, -m32)
24ifeq ($(HAS_BIARCH),y) 30ifeq ($(HAS_BIARCH),y)
25AS := $(AS) --32 31AS := $(AS) --32
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index 6d89ab762ffc..20eb69bd5a6d 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -24,6 +24,12 @@
24# Fill in SRCARCH 24# Fill in SRCARCH
25SRCARCH := x86 25SRCARCH := x86
26 26
27# BITS is used as extension for files which are available in a 32 bit
28# and a 64 bit version to simplify shared Makefiles.
29# e.g.: obj-y += foo_$(BITS).o
30BITS := 64
31export BITS
32
27LDFLAGS := -m elf_x86_64 33LDFLAGS := -m elf_x86_64
28OBJCOPYFLAGS := -O binary -R .note -R .comment -S 34OBJCOPYFLAGS := -O binary -R .note -R .comment -S
29LDFLAGS_vmlinux := 35LDFLAGS_vmlinux :=