diff options
author | dim <dim@FreeBSD.org> | 2011-11-06 14:07:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-11-06 14:07:23 +0000 |
commit | 897775d6ee89e54e447e35fd09436a65a620307d (patch) | |
tree | fa91394f6c2cb70ed6b8ba7066b85e3fb9376e3f /lib/clang/include/llvm/Config/config.h | |
parent | f22dd3ece04a16c3b03a815c5753a37600ec5797 (diff) | |
download | FreeBSD-src-897775d6ee89e54e447e35fd09436a65a620307d.zip FreeBSD-src-897775d6ee89e54e447e35fd09436a65a620307d.tar.gz |
When one attempts to compile the tree with -march=i386, which also used
to be gcc's default before r198344, calls to atomic builtins will not be
expanded inline. Instead, they will be generated as calls to external
functions (e.g. __sync_fetch_and_add_N), leading to linking errors later
on.
Put in a seatbelt that disables use of atomic builtins in libstdc++ and
llvm, when tuning specifically for the real i386 CPU. This does not
protect against all possible issues, but it is better than nothing.
Diffstat (limited to 'lib/clang/include/llvm/Config/config.h')
-rw-r--r-- | lib/clang/include/llvm/Config/config.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/clang/include/llvm/Config/config.h b/lib/clang/include/llvm/Config/config.h index 5b6761c..5ecb51c 100644 --- a/lib/clang/include/llvm/Config/config.h +++ b/lib/clang/include/llvm/Config/config.h @@ -552,7 +552,9 @@ /* #undef LLVM_ETCDIR */ /* Has gcc/MSVC atomic intrinsics */ +#ifndef __tune_i386__ #define LLVM_HAS_ATOMICS 1 +#endif /* Host triple we were built on */ /* #undef LLVM_HOSTTRIPLE */ |