diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2f64fea7cf8..08bb1e8a344 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,15 @@ +2018-10-16 Rainer Orth + + * 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 * testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc index d82e1e4f4fc..8046e97071d 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/comparisons.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc index ed09b9cb977..27c208d51cb 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/cons.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc index a168de66f72..5d139dd5659 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/creation.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc index b854d8fcc14..2036a586671 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/address/v4/members.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc index c07de7aec5a..e67c476ca9d 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/base.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc index ca1018d218c..d8560758c55 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/lookup.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc index f5035079eb6..6b58f584b8c 100644 --- a/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc +++ b/libstdc++-v3/testsuite/experimental/net/internet/resolver/ops/reverse.cc @@ -16,6 +16,7 @@ // . // { dg-options "-std=gnu++14" } +// { dg-add-options net_ts } #include #include diff --git a/libstdc++-v3/testsuite/lib/dg-options.exp b/libstdc++-v3/testsuite/lib/dg-options.exp index cc3e3b212b3..f73ce06960a 100644 --- a/libstdc++-v3/testsuite/lib/dg-options.exp +++ b/libstdc++-v3/testsuite/lib/dg-options.exp @@ -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 } {