Introduce dg-add-options net_ts
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 16 Oct 2018 12:27:52 +0000 (12:27 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 16 Oct 2018 12:27:52 +0000 (12:27 +0000)
* testsuite/lib/dg-options.exp (add_options_for_net_ts): New proc.
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Add dg-add-options net_ts.
* testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc: Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
* testsuite/experimental/net/internet/resolver/base.cc: Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise.

From-SVN: r265192

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc
libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc
libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc
libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc
libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc
libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc
libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc
libstdc++-v3/testsuite/lib/dg-options.exp

index 2f64fea7cf8b7fb6d03e1d1879245a6d648ac7f9..08bb1e8a3445002e549bfc9999011e6078d54629 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * testsuite/lib/dg-options.exp (add_options_for_net_ts): New proc.
+       * testsuite/experimental/net/internet/address/v4/comparisons.cc:
+       Add dg-add-options net_ts.
+       * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
+       * testsuite/experimental/net/internet/address/v4/creation.cc: Likewise.
+       * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
+       * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
+       * testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise.
+       * testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise.
+
 2018-10-16  Jonathan Wakely  <jwakely@redhat.com>
 
        * testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned
index d82e1e4f4fcb4b5ac94df61a6747185a6f5678a9..8046e97071d54b9deea6bae6d5d8edf683097a9a 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index ed09b9cb9779101f9f13eedc000e8eb25ef08121..27c208d51cbf5656c19a61583ec6518521abd054 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index a168de66f72e6ca39aabc3fde37ee37c57fcbec4..5d139dd5659041328734708fdf58c4f1f7006662 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index b854d8fcc142b8442ef76a36082a7d9cc956f7c2..2036a5866717f8cf46337f6dfaea8304a8e23ac9 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index c07de7aec5adcf1fa0756cf56adf82270f8dd752..e67c476ca9dcd558795c47716a4ecb97b7ce873b 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index ca1018d218cb2824ebf7e67d0680be531b889134..d8560758c5592abf9c2793bd3ca741701d04785e 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index f5035079eb6246fe58ede9b5eed05bae3fa67eef..6b58f584b8c4475b35dcce04e21487c885376a45 100644 (file)
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
 
 #include <experimental/internet>
 #include <testsuite_hooks.h>
index cc3e3b212b314dd824502e139bf7c710995bce00..f73ce06960aacf83e8c19524f175f45fe410c377 100644 (file)
@@ -246,6 +246,17 @@ proc add_options_for_no_pch { flags } {
     return "-D__GLIBCXX__=99999999"
 }
 
+# Add to FLAGS all the target-specific flags needed for networking.
+
+proc add_options_for_net_ts { flags } {
+    # Before they were integrated into libc in Solaris 11.4, Solaris needs
+    # libsocket and libnsl for networking applications.
+    if { [istarget *-*-solaris2*] } {
+       return "$flags -lsocket -lnsl"
+    }
+    return $flags
+}
+
 # Like dg-options, but adds to the default options rather than replacing them.
 
 proc dg-additional-options { args } {