All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Set cpu type explicitly, take 2
@ 2005-05-20  6:05 Paul Mackerras
  2005-05-20  7:45 ` Benjamin Herrenschmidt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Mackerras @ 2005-05-20  6:05 UTC (permalink / raw)
  To: linuxppc-dev

Here is a revised version of my patch to set the cpu type explicitly
for gcc when compiling the kernel.  Setting the cpu type is a good
idea in any case, and particularly if you have a biarch gcc.  This
sets the type for all of the ppc cpu families we support.

Any further comments?  Are -mcpu=860 and -mcpu=8540 reasonable for 8xx
and 85xx respectively?  I used -mcpu=power4 rather than -mcpu=970
because the former works with gcc-3.6.6 as in debian and the latter
doesn't.  Unfortunately -mcpu=440 doesn't work either in gcc 3.3,
though it does in gcc 3.4 (as does -mcpu=970).

Paul.

diff -urN linux-2.6/arch/ppc/Makefile pmac-2.5/arch/ppc/Makefile
--- linux-2.6/arch/ppc/Makefile	2005-05-02 08:29:36.000000000 +1000
+++ pmac-2.5/arch/ppc/Makefile	2005-05-19 15:26:42.000000000 +1000
@@ -23,15 +23,20 @@
 LDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -Bstatic
 CPPFLAGS	+= -Iarch/$(ARCH)
 AFLAGS		+= -Iarch/$(ARCH)
-CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe \
-		-ffixed-r2 -mmultiple
+CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe -ffixed-r2 -mmultiple
 CPP		= $(CC) -E $(CFLAGS)
 
 CHECKFLAGS	+= -D__powerpc__
 
-ifndef CONFIG_E500
-CFLAGS		+= -mstring
-endif
+cpu-opt-$(CONFIG_6xx)		+= -mcpu=750 -mtune=7450
+cpu-opt-$(CONFIG_40x)		+= -mcpu=405
+cpu-opt-$(CONFIG_44x)		+= -mcpu=440
+cpu-opt-$(CONFIG_POWER3)	+= -mcpu=power3
+cpu-opt-$(CONFIG_POWER4)	+= -mcpu=power4
+cpu-opt-$(CONFIG_8xx)		+= -mcpu=860
+cpu-opt-$(CONFIG_E500)		+= -mcpu=8540
+
+CFLAGS += $(cpu-opt-y)
 
 cpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
 cpu-as-$(CONFIG_4xx)		+= -Wa,-m405

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-21  0:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-20  6:05 [PATCH] Set cpu type explicitly, take 2 Paul Mackerras
2005-05-20  7:45 ` Benjamin Herrenschmidt
2005-05-20 14:30   ` Dan Malek
2005-05-20 22:27     ` Benjamin Herrenschmidt
2005-05-20 14:28 ` Dan Malek
2005-05-21  0:55   ` Paul Mackerras
2005-05-20 14:59 ` Kumar Gala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.