Please CC the libstdc++ list for libstdc++ patches, this is a requirement for patch submission, see https://gcc.gnu.org/lists.html
On 20/10/16 09:55 +0200, Christophe Lyon wrote:
Hi, Several times I have noticed/reported test failures because some test cases wouldn't link on arm-none-eabi using the default 'old' cpu target: __sync_synchronize cannot be resolved by the linker.
That isn't used by libstdc++ anywhere, so the call to it is being emitted by the compiler. It would be good to know where it comes from.
The attached long patch adds +// { dg-require-thread-fence "" } to all the tests that require it according to the error messages I get. The change is mechanical: - insert this line below dg-do if present - insert this line at the top of the file otherwise For instance: diff --git a/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc b/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc index 633175b..a048250 100644 --- a/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc +++ b/libstdc++-v3/testsuite/18_support/bad_typeid/what.cc @@ -1,3 +1,4 @@ +// { dg-require-thread-fence "" } // 2007-01-30 Paolo Carlini <pcarl...@suse.de> // Copyright (C) 2007-2016 Free Software Foundation, Inc. diff --git a/libstdc++-v3/testsuite/18_support/cxa_vec.cc b/libstdc++-v3/testsuite/18_support/cxa_vec.cc index e712655..f2a6c5a 100644 --- a/libstdc++-v3/testsuite/18_support/cxa_vec.cc +++ b/libstdc++-v3/testsuite/18_support/cxa_vec.cc @@ -1,4 +1,5 @@ // { dg-do run } +// { dg-require-thread-fence "" } // Avoid use of non-overridable new/delete operators in shared // { dg-options "-static" { target *-*-mingw* } } // Test __cxa_vec routines If that's OK, I'm not sure how to write the ChangeLog entry: it modifies 3287 files. In my testing, it replaces 3287 FAILs by 3287 UNSUPPORTED.
Wouldn't it be better to remove the dependency on __sync_synchronize rather than declare nearly 50% of the testsuite UNSUPPORTED? If 3287 tests can't use it is the resulting libstdc++.so actually useful to anyone?