CPUFlags

CPUFlags is a small perl-script serving as a database for compiler-optimisation flags on different hardware-platforms and processors.

I simply was tired of setting up each Makefile with the right parameters and wanted to have an automatic procedure for this. The result might not be optimal, e.g. the database could grow quite large, but it works.

The list of known operating systems contains Linux, Solaris, Darwin (MacOSX) and (to some degree) AIX, Irix, HP-UX, Tru64 and Windows. Various compilers are supported like GCC-2/3/4, Intel-CC, Portland-CC, Sun-CC, Kai-CC, IBM-xlC, Mips-CC, Compaq-CC, Visual-C++ etc. .

You are welcome to send options for platforms/processors which are currently not supported by CPUFlags to me.

Changes

v0.8.2

v0.8.1

v0.8.0

v0.7.2

v0.7.1

v0.7.0

v0.6.11

v0.6.10

v0.6.9

v0.6.8

v0.6.7

v0.6.6

v0.6.5

v0.6.4

v0.6.3

v0.6.2

v0.6.1

v0.6

v0.6pre2

v0.6pre1

v0.5.8

v0.5.7

v0.5.6

v0.5.5

v0.5.4

v0.5.3

v0.5.2

Usage

Command-Line Options

--cpu <name>
Show flags for given CPU identifier <name>.
automatic detection
--comp <name>
Show flags for given compiler <name>.
cc
--showcpu
Show CPU identifier.
off
--(no)cflags
(Don't) print general architecture flags for compiler.
on
--(no)opt
(Don't) print optimisation flags for compiler.
off
-32, -64
Choose between 32 or 64 bit system.
maximal
-h, --help
Print this text.
-v, --verbose
Define verbosity level.
0
-V, --version
Print version number of CPUFlags.

Supported Systems and Compilers

Linux:
gcc-2.x, gcc-3.x, icc-(5678), pgi, pathcc
Solaris:
gcc-2.x, gcc-3.x, SunCC-(67), kcc
AIX:
gcc, xlC
IRIX:
gcc, Mips-CC
Darwin:
gcc, xlc
Tru64:
Compaq-cc
HP-UX:
HP Ansi C++ compiler
Win32:
Visual C++

Supported Processors

Linux:
i386, i486, i586, pentium, pentium-mmx, pentium-pro, p2, p3, p3-sse, p3-centrino, p3-xeon, p4, p4-(w|p|n|f), k6, k6-2, k6-3, athlon, duron, athlon-tbird, athlon-xp, duron-xp, opteron, via-c3a, ppc750, ppc7450
Solaris:
ultra1, ultra2, ultra3, ultra3cu
AIX:
power4
IRIX:
mips4
Darwin:
ppc, ppc6XX, ppc750, ppc7450, ppc970
True64:
EV5, EV5.6, EV6, EV6.7
HP-UX:
PA7x00 und PA8x00
Win32:
i386, i486, i586, pentium, pentium-mmx, pentium-pro, p2, p3, p3-sse, p3-centrino, p3-xeon, p4, p4-(w|p|n|f), k6, k6-2, k6-3, athlon, duron, athlon-tbird, athlon-xp, duron-xp, opteron, via-c3a

Links

Here you can find a collection of links regarding compiler optimisation: