Commit f44ba7d6 authored by Tom Rini's avatar Tom Rini Committed by Linus Torvalds

[PATCH] ppc32: fix compilation with binutils-2.15

Currently, ppc32 will not always compile with binutils-2.15.  The issue
is that binutils has become even more strict about which opcodes can be
used with which CPU flags.  The problem is that we have a number of
cases where we compile with altivec instructions (with runtime checks to
make sure we can actually run them) in code that's not altivec specific.

The fix for this is to always pass in -maltivec on CONFIG_6xx.  To do
this cleanly, we split our AFLAGS definition up into
aflags-$(CONFIG_FOO).
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 81cae4d4
...@@ -22,7 +22,7 @@ endif ...@@ -22,7 +22,7 @@ endif
LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS += -Iarch/$(ARCH) CPPFLAGS += -Iarch/$(ARCH)
AFLAGS += -Iarch/$(ARCH) aflags-y += -Iarch/$(ARCH)
cflags-y += -Iarch/$(ARCH) -msoft-float -pipe \ cflags-y += -Iarch/$(ARCH) -msoft-float -pipe \
-ffixed-r2 -Wno-uninitialized -mmultiple -ffixed-r2 -Wno-uninitialized -mmultiple
CPP = $(CC) -E $(CFLAGS) CPP = $(CC) -E $(CFLAGS)
...@@ -33,10 +33,16 @@ ifndef CONFIG_E500 ...@@ -33,10 +33,16 @@ ifndef CONFIG_E500
cflags-y += -mstring cflags-y += -mstring
endif endif
aflags-$(CONFIG_4xx) += -m405
cflags-$(CONFIG_4xx) += -Wa,-m405 cflags-$(CONFIG_4xx) += -Wa,-m405
aflags-$(CONFIG_6xx) += -maltivec
cflags-$(CONFIG_6xx) += -Wa,-maltivec
aflags-$(CONFIG_E500) += -me500
cflags-$(CONFIG_E500) += -Wa,-me500 cflags-$(CONFIG_E500) += -Wa,-me500
aflags-$(CONFIG_PPC64BRIDGE) += -mppc64bridge
cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge cflags-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
AFLAGS += $(aflags-y)
CFLAGS += $(cflags-y) CFLAGS += $(cflags-y)
head-y := arch/ppc/kernel/head.o head-y := arch/ppc/kernel/head.o
......
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