diff options
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | arch/x86/Makefile | 13 | ||||
-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
@@ -196,6 +196,9 @@ CROSS_COMPILE ?= | |||
196 | UTS_MACHINE := $(ARCH) | 196 | UTS_MACHINE := $(ARCH) |
197 | SRCARCH := $(ARCH) | 197 | SRCARCH := $(ARCH) |
198 | 198 | ||
199 | # for i386 and x86_64 we use SRCARCH equal to x86 | ||
200 | SRCARCH := $(if $(filter x86_64 i386,$(SRCARCH)),x86,$(SRCARCH)) | ||
201 | |||
199 | KCONFIG_CONFIG ?= .config | 202 | KCONFIG_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' |
421 | include $(srctree)/arch/$(ARCH)/Makefile | 424 | include $(srctree)/arch/$(SRCARCH)/Makefile |
422 | export KBUILD_DEFCONFIG | 425 | export KBUILD_DEFCONFIG |
423 | 426 | ||
424 | config %config: scripts_basic outputmakefile FORCE | 427 | config %config: scripts_basic outputmakefile FORCE |
@@ -497,7 +500,7 @@ else | |||
497 | KBUILD_CFLAGS += -O2 | 500 | KBUILD_CFLAGS += -O2 |
498 | endif | 501 | endif |
499 | 502 | ||
500 | include $(srctree)/arch/$(ARCH)/Makefile | 503 | include $(srctree)/arch/$(SRCARCH)/Makefile |
501 | 504 | ||
502 | ifdef CONFIG_FRAME_POINTER | 505 | ifdef CONFIG_FRAME_POINTER |
503 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | 506 | KBUILD_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 | |||
6 | ifeq ($(ARCH),i386) | ||
7 | include $(srctree)/arch/x86/Makefile_32 | ||
8 | else | ||
9 | include $(srctree)/arch/x86/Makefile_64 | ||
10 | endif | ||
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 | ||
21 | SRCARCH := 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 | |||
46 | KBUILD_CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2) | 43 | KBUILD_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. |
49 | include $(srctree)/arch/i386/Makefile.cpu | 46 | include $(srctree)/arch/x86/Makefile_32.cpu |
50 | 47 | ||
51 | # temporary until string.h is fixed | 48 | # temporary until string.h is fixed |
52 | cflags-y += -ffreestanding | 49 | cflags-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 | ||
25 | SRCARCH := 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 |