diff options
Diffstat (limited to 'arch/powerpc/Makefile')
-rw-r--r-- | arch/powerpc/Makefile | 21 |
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 | ||
40 | ifeq ($(CONFIG_PPC64),y) | 40 | ifeq ($(CONFIG_PPC64),y) |
41 | OLDARCH := ppc64 | 41 | OLDARCH := ppc64 |
42 | SZ := 64 | ||
43 | 42 | ||
44 | new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi) | 43 | new_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 | ||
50 | else | 49 | else |
51 | OLDARCH := ppc | 50 | OLDARCH := ppc |
52 | SZ := 32 | 51 | endif |
52 | |||
53 | # It seems there are times we use this Makefile without | ||
54 | # including the config file, but this replicates the old behaviour | ||
55 | ifeq ($(CONFIG_WORD_SIZE),) | ||
56 | CONFIG_WORD_SIZE := 32 | ||
53 | endif | 57 | endif |
54 | 58 | ||
55 | UTS_MACHINE := $(OLDARCH) | 59 | UTS_MACHINE := $(OLDARCH) |
56 | 60 | ||
57 | ifeq ($(HAS_BIARCH),y) | 61 | ifeq ($(HAS_BIARCH),y) |
58 | override AS += -a$(SZ) | 62 | override AS += -a$(CONFIG_WORD_SIZE) |
59 | override LD += -m elf$(SZ)ppc | 63 | override LD += -m elf$(CONFIG_WORD_SIZE)ppc |
60 | override CC += -m$(SZ) | 64 | override CC += -m$(CONFIG_WORD_SIZE) |
61 | override AR := GNUTARGET=elf$(SZ)-powerpc $(AR) | 65 | override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-powerpc $(AR) |
62 | endif | 66 | endif |
63 | 67 | ||
64 | LDFLAGS_vmlinux := -Bstatic | 68 | LDFLAGS_vmlinux := -Bstatic |
@@ -72,7 +76,7 @@ AFLAGS += $(AFLAGS-y) | |||
72 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | 76 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) |
73 | CPP = $(CC) -E $(CFLAGS) | 77 | CPP = $(CC) -E $(CFLAGS) |
74 | 78 | ||
75 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ | 79 | CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__ |
76 | 80 | ||
77 | ifeq ($(CONFIG_PPC64),y) | 81 | ifeq ($(CONFIG_PPC64),y) |
78 | GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) | 82 | GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi) |
@@ -120,8 +124,7 @@ cpu-as-$(CONFIG_E200) += -Wa,-me200 | |||
120 | AFLAGS += $(cpu-as-y) | 124 | AFLAGS += $(cpu-as-y) |
121 | CFLAGS += $(cpu-as-y) | 125 | CFLAGS += $(cpu-as-y) |
122 | 126 | ||
123 | head-y := arch/powerpc/kernel/head_32.o | 127 | head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o |
124 | head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o | ||
125 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o | 128 | head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o |
126 | head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o | 129 | head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o |
127 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o | 130 | head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o |