aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-06-24 22:48:13 +0300
committerGitHub <noreply@github.com>2020-06-24 22:48:13 +0300
commit35f2a2444f9298b59f0f2cd60b71d31c96ffb511 (patch)
tree4b244789e84f2e27451959bc2faf089b16ee64a2 /test cases
parent08f29c18123f1c77866638b9c595a6c2fff163b3 (diff)
parent28d1bb90162931a5fcce7470b22c622b903e6dca (diff)
downloadmeson-35f2a2444f9298b59f0f2cd60b71d31c96ffb511.zip
meson-35f2a2444f9298b59f0f2cd60b71d31c96ffb511.tar.gz
meson-35f2a2444f9298b59f0f2cd60b71d31c96ffb511.tar.bz2
Merge pull request #7370 from alanc/solaris-fixes
Solaris fixes
Diffstat (limited to 'test cases')
-rwxr-xr-xtest cases/common/125 object only target/obj_generator.py2
-rw-r--r--test cases/linuxlike/3 linker script/meson.build6
-rwxr-xr-xtest cases/unit/61 identity cross/build_wrapper.py10
-rwxr-xr-xtest cases/unit/61 identity cross/host_wrapper.py10
4 files changed, 24 insertions, 4 deletions
diff --git a/test cases/common/125 object only target/obj_generator.py b/test cases/common/125 object only target/obj_generator.py
index a33872a..afdbc09 100755
--- a/test cases/common/125 object only target/obj_generator.py
+++ b/test cases/common/125 object only target/obj_generator.py
@@ -13,6 +13,8 @@ if __name__ == '__main__':
ofile = sys.argv[3]
if compiler.endswith('cl'):
cmd = [compiler, '/nologo', '/MDd', '/Fo' + ofile, '/c', ifile]
+ elif sys.platform == 'sunos5':
+ cmd = [compiler, '-fpic', '-c', ifile, '-o', ofile]
else:
cmd = [compiler, '-c', ifile, '-o', ofile]
sys.exit(subprocess.call(cmd))
diff --git a/test cases/linuxlike/3 linker script/meson.build b/test cases/linuxlike/3 linker script/meson.build
index 63765e7..5901bf7 100644
--- a/test cases/linuxlike/3 linker script/meson.build
+++ b/test cases/linuxlike/3 linker script/meson.build
@@ -1,5 +1,11 @@
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)
diff --git a/test cases/unit/61 identity cross/build_wrapper.py b/test cases/unit/61 identity cross/build_wrapper.py
index b5fe7bb..15d5c07 100755
--- a/test cases/unit/61 identity cross/build_wrapper.py
+++ b/test cases/unit/61 identity cross/build_wrapper.py
@@ -1,5 +1,11 @@
#!/usr/bin/env python3
-import subprocess, sys
+import subprocess, sys, platform
-subprocess.call(["cc", "-DEXTERNAL_BUILD"] + sys.argv[1:])
+# Meson does not yet support Studio cc on Solaris, only gcc or clang
+if platform.system() == 'SunOS':
+ cc = 'gcc'
+else:
+ cc = 'cc'
+
+subprocess.call([cc, "-DEXTERNAL_BUILD"] + sys.argv[1:])
diff --git a/test cases/unit/61 identity cross/host_wrapper.py b/test cases/unit/61 identity cross/host_wrapper.py
index e88577c..a3a694a 100755
--- a/test cases/unit/61 identity cross/host_wrapper.py
+++ b/test cases/unit/61 identity cross/host_wrapper.py
@@ -1,5 +1,11 @@
#!/usr/bin/env python3
-import subprocess, sys
+import subprocess, sys, platform
-subprocess.call(["cc", "-DEXTERNAL_HOST"] + sys.argv[1:])
+# Meson does not yet support Studio cc on Solaris, only gcc or clang
+if platform.system() == 'SunOS':
+ cc = 'gcc'
+else:
+ cc = 'cc'
+
+subprocess.call([cc, "-DEXTERNAL_HOST"] + sys.argv[1:])