Make Filesystem TS tests pass in C++17 mode

Message ID CAH6eHdTR+gQ62RuhVgBfiNq6sM3gX1HTS2u5v2PMsPE53BzP9Q@mail.gmail.com
State New
Headers show
Series
  • Make Filesystem TS tests pass in C++17 mode
Related show

Commit Message

Jonathan Wakely April 16, 2018, 8:24 a.m.
The <testsuite_fs.h> header defaults to using std::filesystem in C++17
mode. The Filesystem TS tests need to define the macro that causes
std::experimental::filesystem to be used instead.

This fixes the experimental/filesystem FAILs seen at:
https://gcc.gnu.org/ml/gcc-testresults/2018-04/msg00986.html

Tested powerp64le-linux, committed to trunk.
commit 7a758b36da1f741955bf5fe3893dc32262bd4f23
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sun Apr 15 20:07:44 2018 +0100

    Make Filesystem TS tests pass in C++17 mode
    
    The <testsuite_fs.h> header defaults to using std::filesystem in C++17
    mode. The Filesystem TS tests need to define the macro that causes
    std::experimental::filesystem to be used instead.
    
            * testsuite/experimental/filesystem/file_status/1.cc: Add
            -DUSE_FILESYSTEM_TS to dg-options.
            * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
            Likewise.
            * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
            * testsuite/experimental/filesystem/iterators/
            recursive_directory_iterator.cc: Likewise.
            * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
            * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
            * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
            * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
            * testsuite/experimental/filesystem/operations/create_directories.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/create_directory.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/create_symlink.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/current_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
            * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
            * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
            * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
            * testsuite/experimental/filesystem/operations/last_write_time.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/permissions.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/read_symlink.cc:
            Likewise.
            * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
            * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
            * testsuite/experimental/filesystem/operations/status.cc: Likewise.
            * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
            * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
            * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
            * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
            * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
            * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
            * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
            * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
            * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
            * testsuite/experimental/filesystem/path/construct/default.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
            * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
            * testsuite/experimental/filesystem/path/construct/string_view.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/extension.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/filename.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/root_name.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/root_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
            * testsuite/experimental/filesystem/path/generic/generic_string.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
            * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
            * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
            * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
            * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
            * testsuite/experimental/filesystem/path/query/has_extension.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_filename.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_root_name.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_root_path.cc:
            Likewise.
            * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
            * testsuite/experimental/filesystem/path/query/is_relative.cc:
            Likewise.

Patch

diff --git a/libstdc++-v3/testsuite/experimental/filesystem/file_status/1.cc b/libstdc++-v3/testsuite/experimental/filesystem/file_status/1.cc
index d3ab82d464c..66d45c69727 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/file_status/1.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/file_status/1.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc b/libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc
index cb479e9af72..6199620c4db 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/iterators/directory_iterator.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/iterators/pop.cc b/libstdc++-v3/testsuite/experimental/filesystem/iterators/pop.cc
index 57d089809d6..f881c081eb4 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/iterators/pop.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/iterators/pop.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
index 0a64019e10b..6a647bb0b04 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc
index 5de1dec616a..753e54d33ef 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/absolute.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc
index 96a6fb00883..3a89b649632 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/canonical.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
index 6a193b49a80..6568a6d9c76 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy_file.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy_file.cc
index e1421a7216a..d529d0654bc 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy_file.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy_file.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
index aa61e5ff462..c81b0b8e11f 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc
index 4b2730dc3b4..2e79400fd85 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_symlink.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_symlink.cc
index 6fbebcc1d54..a02131288fb 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_symlink.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_symlink.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc
index 12fa6613b05..81ed212eb19 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/current_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/equivalent.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/equivalent.cc
index 9e541599994..cb208bde753 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/equivalent.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/equivalent.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc
index 1277c3753ec..c4b6ebf0662 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/exists.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc
index bc2dd1bb743..2fdf9bd79d2 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/file_size.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc
index ee40b237ae1..14b2bcea071 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/is_empty.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/last_write_time.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/last_write_time.cc
index 1ca6278ca93..9d1752fd4fc 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/last_write_time.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/last_write_time.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
index 81d153016af..71da5ce4e03 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc
index 60a00cd6989..9d30593acb8 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
index 8d1801099a2..df96d293987 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
index 67f6e989d27..ddf150b79dc 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc
index 619f96e4872..2d3c9a0071c 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/status.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc
index e3286101524..7e60b3fa442 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/temp_directory_path.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc
index 6ffcefebc04..52c83cf92d3 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/append/path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc
index e929d98c5a9..e32be5a333a 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/assign/assign.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc
index d94d5f586d9..2f80b78fdd1 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/assign/copy.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc
index 3f751bb97c5..46b2405e485 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/compare/compare.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc
index 28943f15552..e0a9090cf26 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/compare/path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc
index ca29f3e03ad..fc5f0dfe92e 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/compare/strings.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc
index 70d56d592bc..31bdcb9f1dc 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/concat/path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc
index 5a18ffa9785..649ad0bb0c2 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/concat/strings.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc
index e0463569ea4..c72d4cdc331 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/copy.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc
index ae3ef79c8e5..0b9615658c8 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/default.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc
index 220dc2edbdc..46e0758e294 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/locale.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc
index 9313ae22076..0081318fc42 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/range.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/string_view.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/string_view.cc
index ba8fdd6f732..dd1fd1ddb5e 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/construct/string_view.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/construct/string_view.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs -std=gnu++17" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs -std=gnu++17" }
 // { dg-do run { target c++17 } }
 // { dg-require-filesystem-ts "" }
 
@@ -24,7 +24,6 @@ 
 #include <experimental/filesystem>
 #include <string_view>
 #include <string>
-#define USE_FILESYSTEM_TS
 #include <testsuite_fs.h>
 
 using std::experimental::filesystem::path;
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc
index f48d4b03cb9..ab828dd1655 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/extension.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc
index 73bdb64962f..93ccd7ccb19 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/filename.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc
index aab21759056..b21aba4d509 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/parent_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc
index 60c2a8ef40e..6e0c6a9f0e1 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/relative_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc
index b0a3257555a..535610f4e8f 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_directory.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc
index 455297120bd..f909b3634b1 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_name.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc
index c0ce8487027..50f618a68f8 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/root_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc
index 95bd36399b8..088c4ec4b35 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/decompose/stem.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc
index fe57b3577bf..0d852bd9b88 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/generic/generic_string.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc
index 8eea2a19d04..0f8d7f52749 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/itr/traversal.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc
index 2d09809e3e4..42c25b6e0a5 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/clear.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc
index ac5dcd22179..e26bb3b1587 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/make_preferred.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc
index b8ff7c3d583..acbc0fd3d0c 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/remove_filename.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc
index 9bf33c9a1cc..7c1f2eaa422 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_extension.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc
index 1095e63cc46..d789a56405a 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/replace_filename.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc
index bb0adf0ba56..6261af7f547 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/modifiers/swap.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/native/string.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/native/string.cc
index 595ce091b68..bd353ae5e19 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/native/string.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/native/string.cc
@@ -15,7 +15,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc
index 455780cdcf6..9206fefd4e3 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/nonmember/hash_value.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc
index edb4fea1c07..26104533b1d 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/empty.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc
index 1c723de8288..1afe4cfce3f 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_extension.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc
index 61409d9e429..b1eaabeeffb 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_filename.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc
index efab9a2b35b..d5272181b02 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_parent_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc
index f69c8e55ace..bd40d831b6a 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_relative_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc
index d060e3b980e..e2910673de1 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_directory.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc
index 544e677b34b..80cf98a34a0 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_name.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc
index a8b60d6531e..a2207311e66 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_root_path.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc
index 055ebe43c9d..32f16133b3f 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/has_stem.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }
 
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc b/libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc
index d186e3484f5..6c8c60b43cb 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/path/query/is_relative.cc
@@ -1,4 +1,4 @@ 
-// { dg-options "-lstdc++fs" }
+// { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" }
 // { dg-do run { target c++11 } }
 // { dg-require-filesystem-ts "" }