[PATCH] Set cpu explicitly in kernel compiles

Tom Rini trini at kernel.crashing.org
Thu May 5 01:34:19 EST 2005


On Wed, May 04, 2005 at 07:28:30AM -0400, Dan Malek wrote:
> 
> On May 4, 2005, at 3:05 AM, Paul Mackerras wrote:
> 
> >+cpu-opt-$(CONFIG_6xx)		+= -mcpu=750 -mtune=7450
> 
> What about cores that aren't CONFIG_6xx (8xx, 4xx, e500, etc.)?

There's two choices.  We can either go down the route x86 has of each
CPU family choice defaulting to a cpu-opt-..., or we could do roughly
what we do today and force the default cpu/tune to be whatever the
default is on gcc-3.3.x (which I assume is really gcc-3.x.x, but..).

Since there are folks working on optimizing toolchains on at least some
of the newer CPUs, I'd be inclined to say we should do something like
cpu-opt-y := ... gcc-3.3.x defaults ...
cpu-opt-$(CONFIG_6xx) := -mcpu=750 -mtune=7450
cpu-opt-$(CONFIG_8xx) := -mcpu=800 -mtune=800 # Or whatever it is..

CFLAGS += $(cpu-opt-y)

> How about we create a CONFIG_GCC_CPUOPT and
> CONFIG_AS_OPT, and just get these out of the configuration file?

Ick.  It's possible, but unfun, to go from CONFIG_FOO="string" to
cflags. 

-- 
Tom Rini
http://gate.crashing.org/~trini/



More information about the Linuxppc-dev mailing list