test: Fix linuxlike/3 linker script on Solaris 11.4
Solaris linker added support for GNU-style --version-script in Solaris 11.4,
but requires adding the -z gnu-version-script-compat flag to enable it.
project('linker script', 'c')
+# Solaris 11.4 ld supports --version-script only when you also specify
+# -z gnu-version-script-compat
+if meson.get_compiler('c').get_linker_id() == 'ld.solaris'
+ add_project_link_arguments('-Wl,-z,gnu-version-script-compat', language: 'C')
+endif
+
# Static map file
mapfile = 'bob.map'
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
