aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Makefile
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-09-20 20:16:20 -0400
committerPaul Mackerras <paulus@samba.org>2007-10-02 19:12:02 -0400
commit2578bfae84a78bd46fdbc0d2f9d39e9fbc9c8a3f (patch)
tree9dad1abf1dd5fa31cc1d507d559baa7e52d6a836 /arch/powerpc/Makefile
parent75918a4b5998c93ee1ab131fbe64b97b5d0d2315 (diff)
[POWERPC] Create and use CONFIG_WORD_SIZE
Linus made this suggestion for the x86 merge and this starts the process for powerpc. We assume that CONFIG_PPC64 implies CONFIG_PPC_MERGE and CONFIG_PPC_STD_MMU_32 implies CONFIG_PPC_STD_MMU. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r--arch/powerpc/Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 87aff5372d6e..71632b20b81d 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -39,7 +39,6 @@ KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
39 39
40ifeq ($(CONFIG_PPC64),y) 40ifeq ($(CONFIG_PPC64),y)
41OLDARCH := ppc64 41OLDARCH := ppc64
42SZ := 64
43 42
44new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) 43new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
45 44
@@ -49,16 +48,21 @@ endif
49 48
50else 49else
51OLDARCH := ppc 50OLDARCH := ppc
52SZ := 32 51endif
52
53# It seems there are times we use this Makefile without
54# including the config file, but this replicates the old behaviour
55ifeq ($(CONFIG_WORD_SIZE),)
56CONFIG_WORD_SIZE := 32
53endif 57endif
54 58
55UTS_MACHINE := $(OLDARCH) 59UTS_MACHINE := $(OLDARCH)
56 60
57ifeq ($(HAS_BIARCH),y) 61ifeq ($(HAS_BIARCH),y)
58override AS += -a$(SZ) 62override AS += -a$(CONFIG_WORD_SIZE)
59override LD += -m elf$(SZ)ppc 63override LD += -m elf$(CONFIG_WORD_SIZE)ppc
60override CC += -m$(SZ) 64override CC += -m$(CONFIG_WORD_SIZE)
61override AR := GNUTARGET=elf$(SZ)-powerpc $(AR) 65override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-powerpc $(AR)
62endif 66endif
63 67
64LDFLAGS_vmlinux := -Bstatic 68LDFLAGS_vmlinux := -Bstatic
@@ -72,7 +76,7 @@ AFLAGS += $(AFLAGS-y)
72CFLAGS += -msoft-float -pipe $(CFLAGS-y) 76CFLAGS += -msoft-float -pipe $(CFLAGS-y)
73CPP = $(CC) -E $(CFLAGS) 77CPP = $(CC) -E $(CFLAGS)
74 78
75CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ 79CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
76 80
77ifeq ($(CONFIG_PPC64),y) 81ifeq ($(CONFIG_PPC64),y)
78GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) 82GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
@@ -120,8 +124,7 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200
120AFLAGS += $(cpu-as-y) 124AFLAGS += $(cpu-as-y)
121CFLAGS += $(cpu-as-y) 125CFLAGS += $(cpu-as-y)
122 126
123head-y := arch/powerpc/kernel/head_32.o 127head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o
124head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
125head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o 128head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
126head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o 129head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o
127head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o 130head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o