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 <dje.gcc@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* 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.
// { dg-options "-std=gnu++2a" }
// { dg-do run { target c++2a } }
+// { dg-add-options libatomic }
#include <atomic>
#include <testsuite_hooks.h>
# 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