gcc/libstdc++-v3/testsuite
David Edelsohn fb6b24c66e testuite: fix libtdc++ libatomic flags
Some ports require libatomic for atomic operations, at least for some
data types and widths.  The libstdc++ testsuite previously was updated
to link against libatomic, but the search path was hard-coded to
something that is not always correct, and the shared library search
path was not set.

The search path was hard-coded to the expected location of the
libatomic build directory relative to the libstdc++ testsuite
directory, but if one uses parallelism when invoking the libstdc++
testsuite, the tests are run in the "normalXX" sub-directories, for
which the hard-coded search path is incorrect. The path also is
incorrect for alternative multilib and tool options.

This patch adopts the logic from gcc/testsuite/lib/atomic-dg.exp to
search for the library and adds the logic to the libstdc++ testsuite
libatomic seatch path code.  Previously the libstdc++ testsuite atomic
tests failed depending on the build configuration and if a build of
libatomic was installed in the default search path.

Bootstrapped on powerpc-ibm-aix7.2.3.0.

libstdc++-v3/ChangeLog:

	* testsuite/lib/dg-options.exp (atomic_link_flags): New.
	(add_options_for_libatomic): Use atomic_link_flags.
2021-04-24 11:57:05 -04:00
..
17_intro libstdc++: Fix test that fails in C++20 mode [PR 99995] 2021-04-12 11:34:19 +01:00
18_support libstdc++: Move atomic functions to libsupc++ [PR 96657] 2021-04-15 16:56:44 +01:00
19_diagnostics libstdc++: Fix incorrect test for std::error_code comparisons 2021-02-03 15:49:36 +00:00
20_util libstdc++: Reject std::make_shared<T[]> [PR 99006] 2021-04-22 15:49:27 +01:00
21_strings libstdc++: Fix and complete __gnu_debug::basic_string implementation 2021-03-25 21:56:14 +01:00
22_locale Update copyright years. 2021-01-04 10:26:59 +01:00
23_containers libstdc++: Fix invalid constexpr function in C++11 mode [PR 99985] 2021-04-09 13:09:24 +01:00
24_iterators libstdc++: Implement P2259R1 changes [PR95983] 2021-04-20 09:18:50 -04:00
25_algorithms libstdc++: [_GLIBCXX_DEBUG] Fix management of __dp_sign_max_size [PR 99402] 2021-04-09 21:46:35 +02:00
26_numerics libstdc++: Fix some tests that fail in C++20 mode 2021-04-12 12:30:07 +01:00
27_io libstdc++: Fix filesystem::path construction from COW string [PR 99805] 2021-04-07 16:39:24 +01:00
28_regex Update copyright years. 2021-01-04 10:26:59 +01:00
29_atomics libstdc++: Add workaround for ia32 floating atomics miscompilations [PR100184] 2021-04-22 15:09:58 +02:00
30_threads libstdc++: Fix semaphore to work with system_clock timeouts 2021-04-22 17:35:00 +01:00
abi Update copyright years. 2021-01-04 10:26:59 +01:00
backward Update copyright years. 2021-01-04 10:26:59 +01:00
config Update copyright years. 2021-01-04 10:26:59 +01:00
data
decimal Update copyright years. 2021-01-04 10:26:59 +01:00
experimental libstdc++ Simplify definition of net::socket_base constants 2021-04-23 13:54:34 +01:00
ext libstdc++: Suppress more vstring testsuite warnings. [PR 98613] 2021-01-10 18:22:51 -05:00
lib testuite: fix libtdc++ libatomic flags 2021-04-24 11:57:05 -04:00
libstdc++-abi Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-dg libstdc++: Add std::experimental::simd from the Parallelism TS 2 2021-01-27 16:37:26 +00:00
libstdc++-prettyprinters Update copyright years. 2021-01-04 10:26:59 +01:00
libstdc++-xmethods Update copyright years. 2021-01-04 10:26:59 +01:00
performance Update copyright years. 2021-01-04 10:26:59 +01:00
special_functions Update copyright years. 2021-01-04 10:26:59 +01:00
std libstdc++: Implement P2259R1 changes [PR95983] 2021-04-20 09:18:50 -04:00
tr1 libstdc++: Fix some tests that fail in C++20 mode 2021-04-12 12:30:07 +01:00
tr2 Update copyright years. 2021-01-04 10:26:59 +01:00
util libstdc++ Simplify definition of net::socket_base constants 2021-04-23 13:54:34 +01:00
Makefile.am libstdc++: Work around test failures using -mno-tree-vrp 2021-02-03 15:49:30 +00:00
Makefile.in libstdc++: Work around test failures using -mno-tree-vrp 2021-02-03 15:49:30 +00:00