[PATCH] Set cpu explicitly in kernel compiles
Tom Rini
trini at kernel.crashing.org
Mon Jul 4 04:32:37 EST 2005
On Sun, Jul 03, 2005 at 07:29:55PM +0200, Olaf Hering wrote:
> On Wed, May 04, Paul Mackeras wrote:
>
> > What do people think of this patch? The motivation for it is that a
> > biarch gcc-4.0 will by default tune for POWER4, even for a 32-bit
> > compile, meaning that we end up with a lot of nops we don't need.
> > This also takes out -mstring.
> >
> > With this, the text size reduces by about 120k for my normal config
> > when compiling with a biarch gcc-4.0. The text size also reduces
> > slightly when compiling with the Debian gcc-3.3.5 (32-bit only, not
> > biarch).
> >
> > If there are no objections I'll send this to Andrew and Linus.
>
> What will be done about this patch? -mcpu=750 reduces .text by 70k.
The fix for the real problem is now in. Perhaps, based off gcc's info
page, we should update (from what 2.6.12 looks like) to do:
cpu-as-y = -Wa,-mcpu=powerpc # Pure ppc32
cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
cpu-as-$(CONFIG_PPC_601) := -Wa,-mcpu=601 # Or whatever the 601 option is
cpu-as-$(CONFIG_PPC64BRIDGE) := -Wa,mcpu=powerpc64
< add 4xx/BookE here >
And see what we get. I really don't think we should fall into the i386
ugly trap of i386/i486/i586/i586tsc/... 20 other options ..., esp since
it looks like the main win is switching from 100% generic powerpc to
something more specific. And going with the generic name means if gcc
starts doing something different on 750 vs 7400 vs 604, we win.
--
Tom Rini
http://gate.crashing.org/~trini/
More information about the Linuxppc-dev
mailing list