Add ld path to binary search path when appropriate.
Add ld path to binary search path when appropriate.

The binary search path does not presently include the path of ld if the
path of ld differs from the path of the cc compiler. This change adds
the path of ld when its path differs from that of the cc compiler.

Fixes: #13857

Closes #13942.

PiperOrigin-RevId: 397720260

perezd/bazel,cushon/bazel,cushon/bazel,katre/bazel,bazelbuild/bazel,cushon/bazel,ButterflyNetwork/bazel,katre/bazel,bazelbuild/bazel,katre/bazel,perezd/bazel,ButterflyNetwork/bazel,cushon/bazel,perezd/bazel,cushon/bazel,ButterflyNetwork/bazel,perezd/bazel,ButterflyNetwork/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,katre/bazel,cushon/bazel,bazelbuild/bazel,bazelbuild/bazel,katre/bazel,perezd/bazel,ButterflyNetwork/bazel,perezd/bazel,bazelbuild/bazel,katre/bazel,perezd/bazel