[PATCH 2/2] [PPC64] change powerpc Makefile to use the new tuning options
Marvin
marvin24 at gmx.de
Sun Jul 27 02:44:34 EST 2008
This patch modifies the Makefile to use the new tuning options. Most of the
work
is done in Kconfig now, so this looks a little bit more clearly (except the
broken altivec hack).
Subject: [PATCH 2/2] [PPC64] change powerpc Makefile to use the new tuning
options
---
arch/powerpc/Makefile | 24 +++++-------------------
1 files changed, 5 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 9155c93..dc189e7 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,29 +75,15 @@ CPP = $(CC) -E $(KBUILD_CFLAGS)
CHECKFLAGS
+= -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
ifeq ($(CONFIG_PPC64),y)
-GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y";
fi)
-
-ifeq ($(CONFIG_POWER4_ONLY),y)
-ifeq ($(CONFIG_ALTIVEC),y)
-ifeq ($(GCC_BROKEN_VEC),y)
- KBUILD_CFLAGS += $(call cc-option,-mcpu=970)
-else
- KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
-endif
-else
- KBUILD_CFLAGS += $(call cc-option,-mcpu=power4)
-endif
-else
- KBUILD_CFLAGS += $(call cc-option,-mtune=power4)
-endif
+KBUILD_CFLAGS += $(call cc-option, -mcpu=$(CONFIG_OPT_CPU) )
+KBUILD_CFLAGS += $(call cc-option, -mtune=$(CONFIG_TUNE_CPU) )
+ifeq ($(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi),y)
+ KBUILD_CFLAGS := $(subst mcpu=970,mcpu=power4,$(KBUILD_CFLAGS))
+endif
else
LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
endif
-ifeq ($(CONFIG_TUNE_CELL),y)
- KBUILD_CFLAGS += $(call cc-option,-mtune=cell)
-endif
-
# No AltiVec instruction when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
--
1.5.6.2
More information about the Linuxppc-dev
mailing list