Configuration: make Solaris builds with gcc recognise GNU ld
The solaris config targets assumed that GNU cc used Sun ld at all
times. However, there are setups where GNU ld is used instead, so we
adapt the Solaris gcc config targets to use the mechanism introduced
with Configurations/shared_info.pl to try to detect what ld flavor is
being used and set the diverse ld flags accordingly.
Fixes #8547
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8548)