aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--arch/x86/Makefile13
-rw-r--r--arch/x86/Makefile_32 (renamed from arch/i386/Makefile)7
-rw-r--r--arch/x86/Makefile_32.cpu (renamed from arch/i386/Makefile.cpu)0
-rw-r--r--arch/x86/Makefile_64 (renamed from arch/x86_64/Makefile)5
5 files changed, 21 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 2a4729024dfb..8816060cdf40 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,9 @@ CROSS_COMPILE ?=
196UTS_MACHINE := $(ARCH) 196UTS_MACHINE := $(ARCH)
197SRCARCH := $(ARCH) 197SRCARCH := $(ARCH)
198 198
199# for i386 and x86_64 we use SRCARCH equal to x86
200SRCARCH := $(if $(filter x86_64 i386,$(SRCARCH)),x86,$(SRCARCH))
201
199KCONFIG_CONFIG ?= .config 202KCONFIG_CONFIG ?= .config
200 203
201# SHELL used by kbuild 204# SHELL used by kbuild
@@ -418,7 +421,7 @@ ifeq ($(config-targets),1)
418# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. 421# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
419# KBUILD_DEFCONFIG may point out an alternative default configuration 422# KBUILD_DEFCONFIG may point out an alternative default configuration
420# used for 'make defconfig' 423# used for 'make defconfig'
421include $(srctree)/arch/$(ARCH)/Makefile 424include $(srctree)/arch/$(SRCARCH)/Makefile
422export KBUILD_DEFCONFIG 425export KBUILD_DEFCONFIG
423 426
424config %config: scripts_basic outputmakefile FORCE 427config %config: scripts_basic outputmakefile FORCE
@@ -497,7 +500,7 @@ else
497KBUILD_CFLAGS += -O2 500KBUILD_CFLAGS += -O2
498endif 501endif
499 502
500include $(srctree)/arch/$(ARCH)/Makefile 503include $(srctree)/arch/$(SRCARCH)/Makefile
501 504
502ifdef CONFIG_FRAME_POINTER 505ifdef CONFIG_FRAME_POINTER
503KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 506KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
new file mode 100644
index 000000000000..65077d79c846
--- /dev/null
+++ b/arch/x86/Makefile
@@ -0,0 +1,13 @@
1# Unified Makefile for i386 and x86_64
2
3# No need to remake these files
4$(srctree)/arch/x86/Makefile%: ;
5
6ifeq ($(ARCH),i386)
7 include $(srctree)/arch/x86/Makefile_32
8else
9 include $(srctree)/arch/x86/Makefile_64
10endif
11
12
13
diff --git a/arch/i386/Makefile b/arch/x86/Makefile_32
index f5b9a37def8b..346ac0766875 100644
--- a/arch/i386/Makefile
+++ b/arch/x86/Makefile_32
@@ -1,5 +1,5 @@
1# 1#
2# i386/Makefile 2# i386 Makefile
3# 3#
4# This file is included by the global makefile so that you can add your own 4# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies. Remember to do have actions 5# architecture-specific flags and dependencies. Remember to do have actions
@@ -17,9 +17,6 @@
17# 20050320 Kianusch Sayah Karadji <kianusch@sk-tech.net> 17# 20050320 Kianusch Sayah Karadji <kianusch@sk-tech.net>
18# Added support for GEODE CPU 18# Added support for GEODE CPU
19 19
20# Fill in SRCARCH
21SRCARCH := x86
22
23# BITS is used as extension for files which are available in a 32 bit 20# BITS is used as extension for files which are available in a 32 bit
24# and a 64 bit version to simplify shared Makefiles. 21# and a 64 bit version to simplify shared Makefiles.
25# e.g.: obj-y += foo_$(BITS).o 22# e.g.: obj-y += foo_$(BITS).o
@@ -46,7 +43,7 @@ KBUILD_CFLAGS += -pipe -msoft-float -mregparm=3 -freg-struct-return
46KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) 43KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
47 44
48# CPU-specific tuning. Anything which can be shared with UML should go here. 45# CPU-specific tuning. Anything which can be shared with UML should go here.
49include $(srctree)/arch/i386/Makefile.cpu 46include $(srctree)/arch/x86/Makefile_32.cpu
50 47
51# temporary until string.h is fixed 48# temporary until string.h is fixed
52cflags-y += -ffreestanding 49cflags-y += -ffreestanding
diff --git a/arch/i386/Makefile.cpu b/arch/x86/Makefile_32.cpu
index e372b584e919..e372b584e919 100644
--- a/arch/i386/Makefile.cpu
+++ b/arch/x86/Makefile_32.cpu
diff --git a/arch/x86_64/Makefile b/arch/x86/Makefile_64
index 20eb69bd5a6d..57e714a47af7 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86/Makefile_64
@@ -1,5 +1,5 @@
1# 1#
2# x86_64/Makefile 2# x86_64 Makefile
3# 3#
4# This file is included by the global makefile so that you can add your own 4# This file is included by the global makefile so that you can add your own
5# architecture-specific flags and dependencies. Remember to do have actions 5# architecture-specific flags and dependencies. Remember to do have actions
@@ -21,9 +21,6 @@
21# 21#
22# $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $ 22# $Id: Makefile,v 1.31 2002/03/22 15:56:07 ak Exp $
23 23
24# Fill in SRCARCH
25SRCARCH := x86
26
27# BITS is used as extension for files which are available in a 32 bit 24# BITS is used as extension for files which are available in a 32 bit
28# and a 64 bit version to simplify shared Makefiles. 25# and a 64 bit version to simplify shared Makefiles.
29# e.g.: obj-y += foo_$(BITS).o 26# e.g.: obj-y += foo_$(BITS).o