This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/40178] New: libstdc++ fails to detect atomic builtins for EABI ARM/Linux
- From: "mikpe at it dot uu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2009 17:08:28 -0000
- Subject: [Bug libstdc++/40178] New: libstdc++ fails to detect atomic builtins for EABI ARM/Linux
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
EABI ARM/Linux supports atomic builtins in gcc, but they are implemented as
calls to libgcc helper procedures with names like __sync_fetch_and_add_4() etc
rather than being expanded inline.
libstdc++v3/acinclude.m4 tests for atomic builtins by compiling source files
with calls to __sync_fetch_and_add() etc, and then checking if the resulting
assembly files contain the string "__sync__". If they do then acinclude.m4
assumes that atomic builtins are not supported. This presumably works for archs
that inline expand the atomic builtins, but it gives false negatives on EABI
ARM/Linux.
Building gcc-4.4-20090512 for armv5tel-unknown-linux-gnueabi shows:
...
Configuring in armv5tel-unknown-linux-gnueabi/libstdc++-v3
...
checking for thread model used by GCC... posix
checking for atomic builtins for bool... no
checking for atomic builtins for short... no
checking for atomic builtins for int... no
checking for atomic builtins for long long... no
configure: WARNING: No native atomic operations are provided for this platform.
configure: WARNING: They will be faked using a mutex.
configure: WARNING: Performance of certain classes will degrade as a result.
hppa-linux-gnu implements atomic builtins similarly to EABI ARM/Linux, so it
may also be affected by this problem.
--
Summary: libstdc++ fails to detect atomic builtins for EABI
ARM/Linux
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mikpe at it dot uu dot se
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: armv5tel-unknown-linux-gnueabi
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40178