[cfe-commits] r88819 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/clang-translation.c
Eric Christopher
echristo at apple.com
Sun Nov 29 13:48:03 PST 2009
On Nov 23, 2009, at 9:11 AM, Chris Lattner wrote:
>> I personally think -march=native is not the right default, but I see
>> the arguments for it. I guess the argument for making it the default
>> on Linux/BSDs is that many users build their own software?
>
> Yes, that is the biggest argument. The other issue is that the normal fallback is plain i386 which lacks SSE2. We should default to at *least* pentium4 if you don't want native. However, I don't see why native is bad. We should allow (though not a priority) clang to be configured to default to a specific target which may not be the native one at all, this mechanism should handle the case where I want to build for i386 on my penryn.
Personally I like -march=native as a default with the option of configuring for a non-native default if you want. OS or tools vendors can easily do the latter, but random users won't get a virtually useless architecture if they forget.
Since the question was asked newer gccs do default to march=native if they're configured for an x86 or x86_64 cpu.
-eric
More information about the cfe-commits
mailing list