diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-11-06 14:07:23 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-11-06 14:07:23 +0000 |
commit | 130515293b34058d9f48fd431657b1d8d7a6a5c0 (patch) | |
tree | fa91394f6c2cb70ed6b8ba7066b85e3fb9376e3f /gnu | |
parent | 393404f7d9e8d84ebe7d2871e01ea8ce28b7b408 (diff) | |
download | src-130515293b34058d9f48fd431657b1d8d7a6a5c0.tar.gz src-130515293b34058d9f48fd431657b1d8d7a6a5c0.zip |
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.
Notes
Notes:
svn path=/head/; revision=227215
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/libstdc++/config.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/lib/libstdc++/config.h b/gnu/lib/libstdc++/config.h index 4109752a8ae1..a4afbdbec30a 100644 --- a/gnu/lib/libstdc++/config.h +++ b/gnu/lib/libstdc++/config.h @@ -671,7 +671,7 @@ /* #undef VERSION */ /* Define if builtin atomic operations are supported on this host. */ -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(__tune_i386__)) #define _GLIBCXX_ATOMIC_BUILTINS 1 #endif |