Makefile (3164cccdc0e6e16eb9797586aaa8d1f759799c01) Makefile (2578bfae84a78bd46fdbc0d2f9d39e9fbc9c8a3f)
1# This file is included by the global makefile so that you can add your own
2# architecture-specific flags and dependencies. Remember to do have actions
3# for "archclean" and "archdep" for cleaning up and making dependencies for
4# this architecture.
5#
6# This file is subject to the terms and conditions of the GNU General Public
7# License. See the file "COPYING" in the main directory of this archive
8# for more details.

--- 25 unchanged lines hidden (view full) ---

34endif
35
36export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY
37
38KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
39
40ifeq ($(CONFIG_PPC64),y)
41OLDARCH := ppc64
1# This file is included by the global makefile so that you can add your own
2# architecture-specific flags and dependencies. Remember to do have actions
3# for "archclean" and "archdep" for cleaning up and making dependencies for
4# this architecture.
5#
6# This file is subject to the terms and conditions of the GNU General Public
7# License. See the file "COPYING" in the main directory of this archive
8# for more details.

--- 25 unchanged lines hidden (view full) ---

34endif
35
36export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY
37
38KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
39
40ifeq ($(CONFIG_PPC64),y)
41OLDARCH := ppc64
42SZ := 64
43
44new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
45
46ifeq ($(new_nm),y)
47NM := $(NM) --synthetic
48endif
49
50else
51OLDARCH := ppc
42
43new_nm := $(shell if $(NM) --help 2>&1 | grep -- '--synthetic' > /dev/null; then echo y; else echo n; fi)
44
45ifeq ($(new_nm),y)
46NM := $(NM) --synthetic
47endif
48
49else
50OLDARCH := ppc
52SZ := 32
53endif
54
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
57endif
58
55UTS_MACHINE := $(OLDARCH)
56
57ifeq ($(HAS_BIARCH),y)
59UTS_MACHINE := $(OLDARCH)
60
61ifeq ($(HAS_BIARCH),y)
58override AS += -a$(SZ)
59override LD += -m elf$(SZ)ppc
60override CC += -m$(SZ)
61override AR := GNUTARGET=elf$(SZ)-powerpc $(AR)
62override AS += -a$(CONFIG_WORD_SIZE)
63override LD += -m elf$(CONFIG_WORD_SIZE)ppc
64override CC += -m$(CONFIG_WORD_SIZE)
65override AR := GNUTARGET=elf$(CONFIG_WORD_SIZE)-powerpc $(AR)
62endif
63
64LDFLAGS_vmlinux := -Bstatic
65
66CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
67AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
68CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
69CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
70CPPFLAGS += $(CPPFLAGS-y)
71AFLAGS += $(AFLAGS-y)
72CFLAGS += -msoft-float -pipe $(CFLAGS-y)
73CPP = $(CC) -E $(CFLAGS)
74
66endif
67
68LDFLAGS_vmlinux := -Bstatic
69
70CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
71AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
72CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
73CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
74CPPFLAGS += $(CPPFLAGS-y)
75AFLAGS += $(AFLAGS-y)
76CFLAGS += -msoft-float -pipe $(CFLAGS-y)
77CPP = $(CC) -E $(CFLAGS)
78
75CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
79CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
76
77ifeq ($(CONFIG_PPC64),y)
78GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
79
80ifeq ($(CONFIG_POWER4_ONLY),y)
81ifeq ($(CONFIG_ALTIVEC),y)
82ifeq ($(GCC_BROKEN_VEC),y)
83 CFLAGS += $(call cc-option,-mcpu=970)

--- 31 unchanged lines hidden (view full) ---

115cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
116cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
117cpu-as-$(CONFIG_E500) += -Wa,-me500
118cpu-as-$(CONFIG_E200) += -Wa,-me200
119
120AFLAGS += $(cpu-as-y)
121CFLAGS += $(cpu-as-y)
122
80
81ifeq ($(CONFIG_PPC64),y)
82GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
83
84ifeq ($(CONFIG_POWER4_ONLY),y)
85ifeq ($(CONFIG_ALTIVEC),y)
86ifeq ($(GCC_BROKEN_VEC),y)
87 CFLAGS += $(call cc-option,-mcpu=970)

--- 31 unchanged lines hidden (view full) ---

119cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
120cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
121cpu-as-$(CONFIG_E500) += -Wa,-me500
122cpu-as-$(CONFIG_E200) += -Wa,-me200
123
124AFLAGS += $(cpu-as-y)
125CFLAGS += $(cpu-as-y)
126
123head-y := arch/powerpc/kernel/head_32.o
124head-$(CONFIG_PPC64) := arch/powerpc/kernel/head_64.o
127head-y := arch/powerpc/kernel/head_$(CONFIG_WORD_SIZE).o
125head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
126head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o
127head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o
128head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o
129
130head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
131head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
132

--- 77 unchanged lines hidden ---
128head-$(CONFIG_8xx) := arch/powerpc/kernel/head_8xx.o
129head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o
130head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o
131head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o
132
133head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o
134head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
135

--- 77 unchanged lines hidden ---