Skip to content

Commit

Permalink
x86: Add BITS to allow simple Makefile sharing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Gleixner committed Oct 23, 2007
1 parent 428c5a2 commit bec2c48
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
# Fill in SRCARCH
SRCARCH := x86

# BITS is used as extension for files which are available in a 32 bit
# and a 64 bit version to simplify shared Makefiles.
# e.g.: obj-y += foo_$(BITS).o
BITS := 32
export BITS

HAS_BIARCH := $(call cc-option-yn, -m32)
ifeq ($(HAS_BIARCH),y)
AS := $(AS) --32
Expand Down
6 changes: 6 additions & 0 deletions arch/x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
# Fill in SRCARCH
SRCARCH := x86

# BITS is used as extension for files which are available in a 32 bit
# and a 64 bit version to simplify shared Makefiles.
# e.g.: obj-y += foo_$(BITS).o
BITS := 64
export BITS

LDFLAGS := -m elf_x86_64
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux :=
Expand Down

0 comments on commit bec2c48

Please sign in to comment.