This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] atomics
> This doesn't work as this is a compile test not a link test. The
> failure happens at link time as the __sync_lock_test_and_set is
> expanded to a lib call if it cannot be expanded in-line.
It's compile to asm with a grep to simulate a link test, which is
sufficent to test for this functionality.
if AC_TRY_EVAL(ac_compile); then
if grep __sync_fetch_and_add conftest.s >/dev/null 2>&1 ; then
enable_atomic_builtins=no
Could be changed to
if grep __sync_ conftest.s >/dev/null 2>&1 ; then
enable_atomic_builtins=no
and it would work as intended... I think this needs to be done if
_GLIBCXX_ATOMIC_BUILTINS is going to match usage.
> I'm sure that a link test could be created, but I think that for mips
> I will just add the patterns so that it works as intended. I'm not
> sure how other targets will be effected.
... but this is preferred anyway.
-benjamin