diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2023-09-08 10:22:13 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2023-11-06 16:43:56 +0000 |
commit | 470b001c4a454a954d05740448e5d2a61a3679cd (patch) | |
tree | 79c583359804dfc32c3255cc1b6767efafbe7b8e /libcpp | |
parent | e15dd9a04814af45a66ae4114aa16b1c11aae2ec (diff) | |
download | gcc-470b001c4a454a954d05740448e5d2a61a3679cd.zip gcc-470b001c4a454a954d05740448e5d2a61a3679cd.tar.gz gcc-470b001c4a454a954d05740448e5d2a61a3679cd.tar.bz2 |
testsuite: Add and use thread_fence effective-target
Some targets like arm-eabi with newlib and default settings rely on
__sync_synchronize() to ensure synchronization. Newlib does not
implement it by default, to make users aware they have to take special
care.
This makes a few tests fail to link.
This patch adds a new thread_fence effective target (similar to the
corresponding one in libstdc++ testsuite), and uses it in the tests
that need it, making them UNSUPPORTED instead of FAIL and UNRESOLVED.
2023-09-10 Christophe Lyon <christophe.lyon@linaro.org>
gcc/
* doc/sourcebuild.texi (Other attributes): Document thread_fence
effective-target.
gcc/testsuite/
* g++.dg/init/array54.C: Require thread_fence.
* gcc.dg/c2x-nullptr-1.c: Likewise.
* gcc.dg/pr103721-2.c: Likewise.
* lib/target-supports.exp (check_effective_target_thread_fence):
New.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions