Neither the Illumos ld nor the Solaris 11.3 one support the --version-script and
z gnu-linker-script-compat options, which breaks the compiler-rt build.
This patch checks for both options instead of hardcoding their use.
Tested on amd-pc-solaris2.11 (all of Solaris 11.4, 11.3, and Illumos).
It should be possible to remove the UNIX resp. FUCHSIA OR UNIX conditions in
compiler-rt/lib/asan/CMakeLists.txt and compiler-rt/lib/ubsan/CMakeLists.txt.
However, until this has been tested on a wider range of platforms, I've kept them to
be safe.
Not sure who is going to test this.
I'd suggested to try and see that is broken