From: John E. / T. <td...@td...> - 2012-09-24 03:37:42
|
On 9/23/2012 6:48 PM, Richard Haney wrote: > > *Lots of things regarding GCC's target architecture & optimizations* Hi Richard, You'll have to look at the build log for GSL to determine whether your CFLAGS are being propagated correctly. You can generally expect MSYS to report "i686" for uname because doing anything else would generate a lot of unexpected breakages for people distributing packages. You're typically expected to supply at least the "--build" option to the configury system, plus (as you've done) any arch-specific tuning via CFLAGS & friends. On Windows, I suspect even -march=native may fail you, however. I've never confirmed this, but my suspicion would be that GCC isn't up to the task of detecting your processor family when running on Windows. This leaves it up to you to specify your true CPU type via -mtune and/or -march. Nevertheless, there are a few performance gains to be had by correctly sussing out the GCC target arch options -- particularly, I would expect, in something like GSL. As a distributor, I have to create a build of GCC targeting the lowest common denominator, meaning that these optimizations cannot be used by default; as the end user, you have the ability to target a much more specific (and capable) machine. To answer your other post, TDM-GCC version 4.6.1-tdm64-1 by default optimizes for a "generic" x86_64 CPU that doesn't actually exist, but consists of the x86-64 instruction set and little else, making it compatible with any x86-64 CPU ever released. You can check this by adding the "-v" (verbose) flag to your compilation -- you'll see "-mtune=generic -march=x86-64" in the options passed to the language-specific driver (cc1 / cc1plus / etc.). Hope this helps, John E. / TDM |