[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] auto selection of optimal gcc architecture	settings
From:       Padraig Brady <padraig.brady () corvil ! com>
Date:       2003-04-29 9:35:11
[Download RAW message or body]

Chris PeBenito wrote:
> On Mon, 2003-04-28 at 08:30, Mark Gordon wrote:
> [cut]
> 
>>>>>I've been testing http://www.pixelbeat.org/scripts/gcccpuopt
>>>>>over the last while with good results. Essentially it's
>>>>>a Linux specific script that only helps on x86 at present
>>>>>but can be updated to other architectures easily.
> 
> [cut]
> 
>>>>>It would be beneficial IMHO for gentoo to run it at
>>>>>installation time and update /etc/make.conf appropriately?
> 
> [cut]
> 
>>It needs extending even for the x86 compatible world.
>>
>>markg@brenda markg $ ./gcccpuopt 
>> -march=pentium2 -mmmx
> 
> [cut]
> 
> I think this would probably be more useful if it dumped out the CHOST
> line in addition to the optimizations.  This would help with people that
> have the more uncommon processors to set the correct CHOST.  I seen more
> than a few times K6* users have had CHOST="i686-pc-linux-gnu", when it
> should be i586-pc-linux-gnu.
> 
> so it'd print this for a K6-2:
> 
> $ ./gcccpuopt
> CHOST="i586-pc-linux-gnu"
> CFLAGS="-march=k6-2"
> 
> So it could easily be pasted into make.conf.  (-mmmx is redundant)

I would do that as an explicit option as it's handy (outside
the gentoo context) to do things like:
   export CFLAGS="$CFLAGS `gcccpuopt` -O3 -pipe -fomit-frame-pointer"

Other useful options would be KERNEL which would output the
appropriate kernel config (e.g. CONFIG_MK7), and GCCVER which would
specify which gcc to use rather than the installed one.

so in summary options to gcccpuopt should be:
[-CFLAGS | -CHOST | -KERNEL] [-GCCVER]

Pádraig.


--
gentoo-dev@gentoo.org mailing list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic