Use -pthread instead of -lpthread in Bazel.

This seems to work more reliably across platforms. Actually, both seem
to work on Apple platforms, so we probably didn't need the conditions,
while Android seems to only accept -pthread, based on [1].

This also matches Abseil [2], Envoy [3], and a random example in Bazel
documentation [4].

Though, as a counter-example, POSIX seems to prefer -lpthread, not
-pthread, per [5].

[1] https://github.com/grpc/grpc/pull/31938#issuecomment-1370024585
[2] https://github.com/abseil/abseil-cpp/blob/625a18016d6208c6c0419697cb6caa3f23ce31bc/absl/base/BUILD.bazel#L185
[3] https://github.com/envoyproxy/envoy/blob/main/bazel/envoy_binary.bzl#L72
[4] https://bazel.build/tutorials/cpp-use-cases#include-external-libraries
[5] https://github.com/gflags/gflags/issues/176#issuecomment-252243506

Change-Id: I15005bcf4e4b7ebe91a835b8262c5c6434715c3b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/55927
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/util/BUILD.toplevel b/util/BUILD.toplevel
index 436afee..e0d3148 100644
--- a/util/BUILD.toplevel
+++ b/util/BUILD.toplevel
@@ -207,15 +207,8 @@
     copts = boringssl_copts_c11,
     includes = ["src/include"],
     linkopts = select({
-        # Android supports pthreads, but does not provide a libpthread
-        # to link against.
-        "@platforms//os:android": [],
-        "@platforms//os:macos": [],
-        "@platforms//os:ios": [],
-        "@platforms//os:tvos": [],
-        "@platforms//os:watchos": [],
         "@platforms//os:windows": ["-defaultlib:advapi32.lib"],
-        "//conditions:default": ["-lpthread"],
+        "//conditions:default": ["-pthread"],
     }),
     visibility = ["//visibility:public"],
 )