Commit 46cd109b authored by Tom Rini's avatar Tom Rini Committed by Linus Torvalds

[PATCH] ppc32: Fix building of certain CPU types

The following corrects how we pass CPU flags to gas.  Previous, AFLAGS
was incorrectly assumed to be pased directly to $(AS), which is not the
case.

Concept ack'd by Sam Ravnborg.
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a081a4a8
...@@ -22,28 +22,25 @@ endif ...@@ -22,28 +22,25 @@ endif
LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS += -Iarch/$(ARCH) CPPFLAGS += -Iarch/$(ARCH)
aflags-y += -Iarch/$(ARCH) AFLAGS += -Iarch/$(ARCH)
cflags-y += -Iarch/$(ARCH) -msoft-float -pipe \ CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -Wno-uninitialized -mmultiple -ffixed-r2 -Wno-uninitialized -mmultiple
CPP = $(CC) -E $(CFLAGS) CPP = $(CC) -E $(CFLAGS)
CHECK := $(CHECK) -D__powerpc__=1 CHECK := $(CHECK) -D__powerpc__=1
ifndef CONFIG_E500 ifndef CONFIG_E500
cflags-y += -mstring CFLAGS += -mstring
endif endif
aflags-$(CONFIG_4xx) += -m405 cpu-as-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
cflags-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_4xx) += -Wa,-m405
aflags-$(CONFIG_6xx) += -maltivec cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
cflags-$(CONFIG_6xx) += -Wa,-maltivec cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
aflags-$(CONFIG_E500) += -me500 cpu-as-$(CONFIG_E500) += -Wa,-me500
cflags-$(CONFIG_E500) += -Wa,-me500
aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge AFLAGS += $(cpu-as-y)
cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge CFLAGS += $(cpu-as-y)
AFLAGS += $(aflags-y)
CFLAGS += $(cflags-y)
head-y := arch/ppc/kernel/head.o head-y := arch/ppc/kernel/head.o
head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o head-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o
......
...@@ -2,16 +2,6 @@ ...@@ -2,16 +2,6 @@
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
ifdef CONFIG_PPC64BRIDGE
EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
ifdef CONFIG_4xx
EXTRA_AFLAGS := -Wa,-m405
endif
ifdef CONFIG_E500
EXTRA_AFLAGS := -Wa,-me500
endif
extra-$(CONFIG_PPC_STD_MMU) := head.o extra-$(CONFIG_PPC_STD_MMU) := head.o
extra-$(CONFIG_40x) := head_4xx.o extra-$(CONFIG_40x) := head_4xx.o
extra-$(CONFIG_44x) := head_44x.o extra-$(CONFIG_44x) := head_44x.o
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
# Makefile for the linux ppc-specific parts of the memory manager. # Makefile for the linux ppc-specific parts of the memory manager.
# #
ifdef CONFIG_PPC64BRIDGE
EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
obj-y := fault.o init.o mem_pieces.o \ obj-y := fault.o init.o mem_pieces.o \
mmu_context.o pgtable.o mmu_context.o pgtable.o
......
...@@ -2,13 +2,6 @@ ...@@ -2,13 +2,6 @@
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
ifdef CONFIG_PPC64BRIDGE
EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
ifdef CONFIG_40x
EXTRA_AFLAGS := -Wa,-m405
endif
# Extra CFLAGS so we don't have to do relative includes # Extra CFLAGS so we don't have to do relative includes
CFLAGS_pmac_setup.o += -Iarch/$(ARCH)/mm CFLAGS_pmac_setup.o += -Iarch/$(ARCH)/mm
......
...@@ -2,16 +2,6 @@ ...@@ -2,16 +2,6 @@
# Makefile for the linux kernel. # Makefile for the linux kernel.
# #
ifdef CONFIG_PPC64BRIDGE
EXTRA_AFLAGS := -Wa,-mppc64bridge
endif
ifdef CONFIG_4xx
EXTRA_AFLAGS := -Wa,-m405
endif
ifdef CONFIG_E500
EXTRA_AFLAGS := -Wa,-me500
endif
CFLAGS_prom_init.o += -fPIC CFLAGS_prom_init.o += -fPIC
CFLAGS_btext.o += -fPIC CFLAGS_btext.o += -fPIC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment