diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
index a87fb056cc..57897a9efd 100755
--- a/scripts/test-installation.pl
+++ b/scripts/test-installation.pl
@@ -115,19 +115,21 @@ while (<SOVERSIONS>) {
   if (/^lib/) {
     ($name, $version)= /^lib(.*)\.so-version=\.(.*)$/;
     # Filter out some libraries we don't want to link:
-    # - nss_ldap since it's not yet available
-    # - libdb1 since it conflicts with libdb
-    # - libthread_db since it contains unresolved references
-    # - it's just a test NSS module
-    # - We don't provide the libgcc so we don't test it
-    # - libmvec if it wasn't built
+    @skip = (
+      # conflicts with libdb
+      "db1",
+      # contains unresolved references
+      "thread_db",
+      # is just a test NSS module
+      "nss_test1",
+      # are not provided by glibc
+      "libgcc_s", "nss_ldap",
+    );
+    next if (grep { $_ eq $name } @skip);
+    # libmvec if it wasn't built
     next if ($build_mathvec == 0 && $name eq "mvec");
-    if ($name ne "nss_ldap" && $name ne "db1"
-	&& $name ne "thread_db"
-	&& $name ne "nss_test1" && $name ne "libgcc_s") {
-      $link_libs .= " -l$name";
-      $versions{$name} = $version;
-    }
+    $link_libs .= " -l$name";
+    $versions{$name} = $version;
   } elsif ($LD_SO ne "") {
     ($ld_so_name, $ld_so_version) = split ('\.so\.', $LD_SO);
   } else {
