From: David Edelsohn Date: Tue, 28 Jul 2020 20:22:04 +0000 (-0400) Subject: testsuite: libstdc++ atomic_float/value_init.cc requires libatomic X-Git-Tag: upstream/12.2.0~14546 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55ede0bb87e74463c5b89fbfd501e85e9e683048;p=platform%2Fupstream%2Fgcc.git testsuite: libstdc++ atomic_float/value_init.cc requires libatomic atomic_float/value_init.cc requires libatomic for some targets, i.e., when it tries to perform an atomic operation with a 64 bit floating point double type on a 32 bit target. This patch adds AIX and Darwin to the list of targets that require the libatomic option and adds the option to the atomic_float/value_init.cc testcase. libstdc++-v3/ChangeLog: 2020-07-28 David Edelsohn Jonathan Wakely Rainer Orth * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add target powerpc-ibm-aix* and powerpc*-*-darwin*. * testsuite/29_atomics/atomic_float/value_init.cc: Add options for libatomic. --- diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc index 237c0dd..38af9bd 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_float/value_init.cc @@ -17,6 +17,7 @@ // { dg-options "-std=gnu++2a" } // { dg-do run { target c++2a } } +// { dg-add-options libatomic } #include #include diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp index 9bfae71..d3f61cb 100644 --- a/libstdc++-v3/testsuite/lib/dg-options.exp +++ b/libstdc++-v3/testsuite/lib/dg-options.exp @@ -260,7 +260,10 @@ proc add_options_for_net_ts { flags } { # Add to FLAGS all the target-specific flags to link to libatomic, if required. proc add_options_for_libatomic { flags } { - if { [istarget hppa*-*-hpux*] || [istarget riscv*-*-*] } { + if { [istarget hppa*-*-hpux*] + || [istarget powerpc-ibm-aix*] + || [istarget powerpc*-*-darwin*] + || [istarget riscv*-*-*] } { return "$flags -L../../libatomic/.libs -latomic" } return $flags