diff --git a/arch/ppc64/Makefile b/arch/ppc64/Makefile index d33e20bcc52f6da5c4ee54665d07b5046117b3f5..691f3008e69870d474fd45934edebc2b1a5eab11 100644 --- a/arch/ppc64/Makefile +++ b/arch/ppc64/Makefile @@ -56,12 +56,19 @@ LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD) CFLAGS += -msoft-float -pipe -mminimal-toc -mtraceback=none \ -mcall-aixdesc +GCC_VERSION := $(call cc-version) +GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;) + ifeq ($(CONFIG_POWER4_ONLY),y) ifeq ($(CONFIG_ALTIVEC),y) +ifeq ($(GCC_BROKEN_VEC),y) CFLAGS += $(call cc-option,-mcpu=970) else CFLAGS += $(call cc-option,-mcpu=power4) endif +else + CFLAGS += $(call cc-option,-mcpu=power4) +endif else CFLAGS += $(call cc-option,-mtune=power4) endif