Recommended -march settings [was: Re: [gentoo-dev] CFLAGS paragraph submission for the GWN]

2006-10-14 Thread Sebastian Bergmann
Lionel Bouton wrote:
 warn
 We would like to remind you that using anything beyond c-O2
 -fomit-frame-pointer -march/-mcpu/-mtune/c in CFLAGS or CXXFLAGS (and
 c-mieee, -mabi/c etc. on selected archs that tell you to do this),
 and using anything at all in LDFLAGS or ASFLAGS, is usually not worth it
 for most users.

 Do we have an official list of recommended -march settings somewhere?

 I, for one, still do not know what the right CFLAGS for my ThinkPad X60s
 with its Intel Core Duo CPU are. At the moment I am using

   CFLAGS=-march=pentium-m -O2 -pipe

 while http://gentoo-wiki.com/Safe_Cflags suggests either

   CFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer

 or

   CFLAGS=-march=pentium-m -msse3 -O2 -pipe -fomit-frame-pointer

 A tool that suggests CFLAGS based on /proc/cpuinfo and/or x86info would
 be nice, too.

-- 
Sebastian Bergmann  http://sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69



signature.asc
Description: OpenPGP digital signature


Re: Recommended -march settings [was: Re: [gentoo-dev] CFLAGS paragraph submission for the GWN]

2006-10-14 Thread Mike Frysinger
On Saturday 14 October 2006 04:49, Sebastian Bergmann wrote:
  Do we have an official list of recommended -march settings somewhere?

  I, for one, still do not know what the right CFLAGS for my ThinkPad X60s
  with its Intel Core Duo CPU are.

but what you actually want is a list that tells you what cpu value to pass 
to -march/-mtune based upon the product name of the processor you're running

wikipedia.org is a good resource to find out the capabilities of your cpu ... 
or you could simply compare `man gcc` to /proc/cpuinfo

CFLAGS=-march=pentium-m -O2 -pipe

should work fine

  while http://gentoo-wiki.com/Safe_Cflags suggests either

CFLAGS=-march=prescott -O2 -pipe -fomit-frame-pointer

here's a good reason why gentoo-wiki is not official ... this is wrong.  the 
duo cpu's are not based on the pentium4 which is what the prescott is

CFLAGS=-march=pentium-m -msse3 -O2 -pipe -fomit-frame-pointer

there is no gcc flag at the moment for duo's which means the pentium-m 
+ -msse3 is your best bet ... the base pentium-m did not include SSE3 support 
so by simply using that -march, you do not have SSE3 enabled
-mike


pgpBk9hGoIyXq.pgp
Description: PGP signature


Re: Recommended -march settings [was: Re: [gentoo-dev] CFLAGS paragraph submission for the GWN]

2006-10-14 Thread Wernfried Haas
On Sat, Oct 14, 2006 at 05:16:29AM -0400, Mike Frysinger wrote:
 On Saturday 14 October 2006 04:49, Sebastian Bergmann wrote:
   Do we have an official list of recommended -march settings somewhere?
 [..]
 but what you actually want is a list that tells you what cpu value to pass 
 to -march/-mtune based upon the product name of the processor you're running

What about creating an official document for both -march/mtune and
CFLAGS settings for different CPUs? If some other people like the idea
and no one else volunteers i can go poke the different arch teams,
toolchain folks and whoever else may be involved about it and compile
a list based on their input.

I wouldn't try to make it a ricer issue but rather a list of flags
that are known to be sane and supported by Gentoo.

cheers,
Wernfried

-- 
Wernfried Haas (amne) - amne at gentoo dot org
Gentoo Forums: http://forums.gentoo.org
IRC: #gentoo-forums on freenode - email: forum-mods at gentoo dot org


pgpLCoRe889mh.pgp
Description: PGP signature


Re: Recommended -march settings [was: Re: [gentoo-dev] CFLAGS paragraph submission for the GWN]

2006-10-14 Thread Simon Stelling

Wernfried Haas wrote:

What about creating an official document for both -march/mtune and
CFLAGS settings for different CPUs? If some other people like the idea
and no one else volunteers i can go poke the different arch teams,
toolchain folks and whoever else may be involved about it and compile
a list based on their input.


Check out these packages [1] before doing that, they will probably 
supply all you need.


[1] http://packages.gentoo.org/search/?sstring=cpuinfo

--
Kind Regards,

Simon Stelling
Gentoo/AMD64 developer
--
gentoo-dev@gentoo.org mailing list



Re: Recommended -march settings [was: Re: [gentoo-dev] CFLAGS paragraph submission for the GWN]

2006-10-14 Thread Christian Heim
On Saturday, 14. October. 2006 11:46, Wernfried Haas wrote:
 On Sat, Oct 14, 2006 at 05:16:29AM -0400, Mike Frysinger wrote:
  On Saturday 14 October 2006 04:49, Sebastian Bergmann wrote:
Do we have an official list of recommended -march settings somewhere?
 
  [..]
  but what you actually want is a list that tells you what cpu value to
  pass to -march/-mtune based upon the product name of the processor you're
  running

 What about creating an official document for both -march/mtune and
 CFLAGS settings for different CPUs? If some other people like the idea
 and no one else volunteers i can go poke the different arch teams,
 toolchain folks and whoever else may be involved about it and compile
 a list based on their input.

I would really like that, I've searched for such a list some times in the past 
and the closest I could come up with is freehackers.orgĀ¹ and the cflags.sh 
script in the forums.

TIA, Christian

[1] http://www.freehackers.org/gentoo/gccflags/

-- 
Christian Heim phreak at gentoo.org
GPG key ID: 9A9F68E6
Fingerprint: AEC4 87B8 32B8 4922 B3A9 DF79 CAE3 556F 9A9F 68E6


pgpoJaKqSOai9.pgp
Description: PGP signature


Re: Recommended -march settings [was: Re: [gentoo-dev] CFLAGS paragraph submission for the GWN]

2006-10-14 Thread Mike Frysinger
On Saturday 14 October 2006 05:46, Wernfried Haas wrote:
 What about creating an official document for both -march/mtune and
 CFLAGS settings for different CPUs?

last i checked they're all supported
-mike


pgp04ODZTAmC0.pgp
Description: PGP signature


Re: [gentoo-dev] CFLAGS paragraph submission for the GWN

2006-10-08 Thread Dice R. Random

On 10/8/06, Lionel Bouton [EMAIL PROTECTED] wrote:

Here's a draft of a paragraph discussing CFLAGS-related problems. This
is the result of a discussion I started on gentoo-dev. Thanks to all
devs who gave feedback this should bring some food for thought to GWN
readers.


Hi Lionel,

Thanks for writing this up, great job.  Nitpicking spelling and
grammar points to follow ;)


configurability that are hallmarks of the uri
link=http://www.gentoo.org/main/en/about.xml Gentoo experience/uri.


Extra space before Gentoo here.


for most users. There's usually very little benefit, high risks and much
time spent on frustating tuning that could be enjoyed doing far more
interesting things.
/warn


frustating should be frustrating


pExample of this are :/p


Should be plural: Examples


lic-fforce-addr/c and c-fweb/c break regularly on x86 with
video libraries or graphic processing apps which use hand-optimised ASM.
c-fweb/c may be safe on amd64 but like above no guarantees/li


optimised should be optimized


For example c-ffast-math/c is added by the xmame/xmess ebuilds on
most architectures even tho you SHOULD NOT put it in your CFLAGS./li


tho should be though
--
gentoo-dev@gentoo.org mailing list