diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
index bc7ef0de2b716..1ae23dadac517 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
@@ -114,6 +114,8 @@ test03()
 #if defined(__MINGW32__) || defined(__MINGW64__)
   // No symlink support
   const fs::path baz = dir/"foo\\\\..\\bar///";
+#elif !defined (_GLIBCXX_HAVE_SYMLINK)
+  const fs::path baz = dir/"foo//../bar///";
 #else
   fs::create_symlink("../bar", foo/"baz");
   const fs::path baz = dir/"foo//./baz///";
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/copy.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/copy.cc
index f3081f4b64ebc..575d32d34fc3d 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/copy.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/copy.cc
@@ -66,7 +66,8 @@ test01()
 void
 test02()
 {
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
   return;
 #endif
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directories.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directories.cc
index 4a7ba1fcb4944..3b9b893ad8e2d 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directories.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directories.cc
@@ -148,7 +148,8 @@ test03()
 void
 test04()
 {
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // no symlinks
 #else
   // PR libstdc++/101510
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directory.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directory.cc
index 90f98302c00f8..e10a4c854f032 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directory.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/create_directory.cc
@@ -70,7 +70,8 @@ test01()
     VERIFY( e.path1() == f );
   }
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // no symlinks
 #else
   // PR libstdc++/101510 create_directory on an existing symlink to a directory
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/permissions.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/permissions.cc
index deed759be80e9..9e7c5fc7e485c 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/permissions.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/permissions.cc
@@ -76,6 +76,7 @@ test02()
 void
 test03()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   using std::filesystem::perms;
   using std::filesystem::perm_options;
 
@@ -111,11 +112,13 @@ test03()
     VERIFY( !caught );
 
   remove(p);
+#endif
 }
 
 void
 test04()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   using perms = std::filesystem::perms;
 
   auto p = __gnu_test::nonexistent_path();
@@ -137,6 +140,7 @@ test04()
   VERIFY( ec == ec2 );
 
   remove(p);
+#endif
 }
 
 void
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc
index 68bbab33bc9e2..feb9e4f3fe0b6 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/read_symlink.cc
@@ -28,6 +28,7 @@ namespace fs = std::filesystem;
 void
 test01()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   auto p = __gnu_test::nonexistent_path();
   std::error_code ec;
 
@@ -42,6 +43,7 @@ test01()
   VERIFY( result == tgt );
 
   remove(p);
+#endif
 }
 
 int
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc
index 26f2d548f82d5..2b094868e4c03 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove.cc
@@ -41,7 +41,8 @@ test01()
   VERIFY( !ec );
   VERIFY( !n );
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
 #else
   auto link = __gnu_test::nonexistent_path();
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
index 943d85c0cc2e3..45b29d6bb7aa2 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/remove_all.cc
@@ -41,7 +41,8 @@ test01()
   VERIFY( !ec );
   VERIFY( n == 0 );
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
 #else
   auto link = __gnu_test::nonexistent_path();
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/rename.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/rename.cc
index f23a2862a0b99..936e306041290 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/rename.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/rename.cc
@@ -75,7 +75,8 @@ test01()
 void
 test_symlinks()
 {
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
 #else
   std::error_code ec;
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc
index ef973b7807b8a..7ed91fa986c11 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/symlink_status.cc
@@ -39,6 +39,7 @@ test01()
   fs::file_status st2 = fs::symlink_status(dot);
   VERIFY( st2.type() == fs::file_type::directory );
 
+#ifdef _GLIBCXX_HAVE_SYMLINK
   fs::path link = __gnu_test::nonexistent_path();
   create_directory_symlink(dot, link);
   __gnu_test::scoped_file l(link, __gnu_test::scoped_file::adopt_file);
@@ -49,6 +50,7 @@ test01()
   st2 = fs::symlink_status(link, ec);
   VERIFY( !ec );
   VERIFY( st2.type() == fs::file_type::symlink );
+#endif
 }
 
 void
@@ -68,6 +70,7 @@ test02()
 void
 test03()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   if (!__gnu_test::permissions_are_testable())
     return;
 
@@ -111,6 +114,7 @@ test03()
   VERIFY( st2.type() == fs::file_type::symlink );
 
   fs::permissions(dir, fs::perms::owner_all, ec);
+#endif
 }
 
 void
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/operations/weakly_canonical.cc b/libstdc++-v3/testsuite/27_io/filesystem/operations/weakly_canonical.cc
index 244b753f84d1d..38c5e76497da0 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/operations/weakly_canonical.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/operations/weakly_canonical.cc
@@ -39,7 +39,8 @@ test01()
   fs::create_directory(bar/"baz");
   fs::path p;
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
 #else
   fs::create_symlink("../bar", foo/"bar");
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 a201415921cfc..be27237b42c69 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
@@ -188,7 +188,8 @@ test05()
 void
 test06()
 {
-#if !(defined __MINGW32__ || defined __MINGW64__)
+#if !(defined __MINGW32__ || defined __MINGW64__) \
+  && defined _GLIBCXX_HAVE_SYMLINK
   auto p = __gnu_test::nonexistent_path();
   create_directories(p/"d1/d2");
   create_directory_symlink("d1", p/"link");
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
index ca38328c5da15..6d95801e34f7c 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc
@@ -67,7 +67,8 @@ test01()
 void
 test02()
 {
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
   return;
 #endif
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
index 03060c6cbb33e..9e29bd978fb6a 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
@@ -147,7 +147,8 @@ test03()
 void
 test04()
 {
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // no symlinks
 #else
   // PR libstdc++/101510
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc
index 67e5fddca0094..dc1e518fe08aa 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc
@@ -69,7 +69,8 @@ test01()
     VERIFY( e.path1() == f );
   }
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // no symlinks
 #else
   // PR libstdc++/101510 create_directory on an existing symlink to a directory
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
index 833aa13dd158b..1cb318a7c3730 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc
@@ -72,6 +72,7 @@ test02()
 void
 test03()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   using perms = std::experimental::filesystem::perms;
 
   __gnu_test::scoped_file f;
@@ -95,11 +96,13 @@ test03()
   VERIFY( ec == ec2 );
 
   remove(p);
+#endif
 }
 
 void
 test04()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   using perms = std::experimental::filesystem::perms;
 
   auto p = __gnu_test::nonexistent_path();
@@ -120,6 +123,7 @@ test04()
   VERIFY( ec == ec2 );
 
   remove(p);
+#endif
 }
 
 void
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc
index 75dae3eac5108..90e92f1201cdb 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc
@@ -29,6 +29,7 @@ namespace fs = std::experimental::filesystem;
 void
 test01()
 {
+#ifdef _GLIBCXX_HAVE_SYMLINK
   auto p = __gnu_test::nonexistent_path();
   std::error_code ec;
 
@@ -43,6 +44,7 @@ test01()
   VERIFY( result == tgt );
 
   remove(p);
+#endif
 }
 
 int
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
index c01f140ee592a..29a24f1bd581e 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc
@@ -42,7 +42,8 @@ test01()
   VERIFY( !ec );
   VERIFY( !n );
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
   return;
 #else
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
index 4b0ce85cf9754..7165ddfb85cce 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc
@@ -42,7 +42,8 @@ test01()
   VERIFY( !ec );
   VERIFY( n == 0 );
 
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
 #else
   auto link = __gnu_test::nonexistent_path();
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc
index 46776e80994e2..520d48ef8d844 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc
@@ -75,7 +75,8 @@ test01()
 void
 test_symlinks()
 {
-#if defined(__MINGW32__) || defined(__MINGW64__)
+#if defined(__MINGW32__) || defined(__MINGW64__) \
+  || !defined (_GLIBCXX_HAVE_SYMLINK)
   // No symlink support
 #else
   std::error_code ec;
