Automatic architecture optimization

Matt Fago fago@earthlink.net
Thu Sep 4 21:38:00 GMT 2003


On Thu, 4 Sep 2003 17:02:44 -0400, Michael Meissner wrote:
> Well the -m<xxx> options are done by each port (ie, it is not standardized
> across platforms).  Have you considered writing the code to do this and
> contributing it?

Perhaps. I'm trying to understand the issues at the moment, and if such 
an effort is likely to be accepted.

> A low tech approach is to use a shell script (maybe even calling it gcc and
> putting it in your PATH ahead of the system gcc) that determines the machine
> (possibly using uname -p) type and then invokes the real gcc with those
> options.  Of the top of my head, something like:

My interest is to have a standard flag (either e.g. -march or -O4 as in 
xlc on AIX) available in gcc so that software users can compile with 
more aggressive optimization when appropriate. I'd thus favor 
internalizing a method similar to your shell script, although 
necessarily more complicated (uname -p is not always reliable), and 
probably part of each port.

  - Matt




More information about the Gcc mailing list