[OE-core] [PATCH 3/3] Add basic PowerPC core tune config

Khem Raj raj.khem at gmail.com
Tue Jul 26 20:03:07 UTC 2011


On Tue, Jul 26, 2011 at 8:22 AM, Kumar Gala <galak at kernel.crashing.org> wrote:
>
> On Jul 26, 2011, at 8:59 AM, Richard Purdie wrote:
>
>> On Tue, 2011-07-26 at 08:47 -0500, Kumar Gala wrote:
>>> On Jul 26, 2011, at 7:44 AM, Richard Purdie wrote:
>>>
>>>> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
>>>> ---
>>>> meta/conf/machine/include/powerpc/arch-powerpc.inc |   45 +++++++++++++++++++-
>>>> meta/conf/machine/include/tune-ppc603e.inc         |   12 ++++-
>>>> meta/conf/machine/include/tune-ppce300c2.inc       |   12 ++++-
>>>> meta/conf/machine/include/tune-ppce500.inc         |   13 ++++--
>>>> meta/conf/machine/include/tune-ppce500mc.inc       |   12 ++++-
>>>> meta/conf/machine/include/tune-ppce500v2.inc       |   12 ++++-
>>>> 6 files changed, 88 insertions(+), 18 deletions(-)
>>>
>>> One thing I'm wondering about as we do this is the ability to pass
>>> --with-cpu to gcc & [e]glibc configure to pickup proper optimized cfgs
>>> & libs for a given target.
>>
>> As far as I can tell, gcc 4.x has no --with-cpu option. We pass the
>> correct march and mtune options to the compiler at runtime through
>> CFLAGS and friends.
>
> Hmm, gcc still supports this:
>
> http://gcc.gnu.org/install/configure.html
>
> --with-cpu=cpu
> --with-cpu-32=cpu
> --with-cpu-64=cpu
> Specify which cpu variant the compiler should generate code for by default. cpu will be used as the default value of the -mcpu= switch. This option is only supported on some targets, including ARM, i386, M68k, PowerPC, and SPARC. The --with-cpu-32 and --with-cpu-64 options specify separate default CPUs for 32-bit and 64-bit modes; these options are only supported for i386, x86-64 and PowerPC.
>
> http://gcc.gnu.org/install/specific.html
>
> powerpc-*-*
> You can specify a default version for the -mcpu=cpu_type switch by using the configure option --with-cpu-cpu_type.

thats only when you dont use -march -mtune -mcpu options but we use
them always so using this configure option is not needed so much
for us. Although I am not sure if the TARGET_CC_ARCH really makes into
gcc runtime especially libgcc in that case --with-cpu will do
things differently.

>
>> You're already found the way to pass configuration to *libc using values
>> in TARGET_FPU to pickup the right configuration.
>>
>> Is there a use case we're missing?
>
> Yes, for [e]glibc we have optimized libc functions for a given / specific PPC processor.  So we need someway to tell configure this.
>

you need to use --with-cpu=CPU option at configure time. glibc
configury does not grok the -mtune options otherwise.

> - k
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




More information about the Openembedded-core mailing list