* 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
+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
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-options "-std=gnu++14" }
+// { dg-add-options net_ts }
#include <experimental/internet>
#include <testsuite_hooks.h>
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 } {