diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-06-29 19:09:52 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-06-22 15:02:05 -0700 |
commit | e4330eff6d340e1a2990f1f0ef7a2e328866ce05 (patch) | |
tree | 9856015c83c20613ee2db571dec810950a37ff42 /test cases/common | |
parent | feef5a1c064af7d9e3143c6df559e112a371e7fe (diff) | |
download | meson-e4330eff6d340e1a2990f1f0ef7a2e328866ce05.zip meson-e4330eff6d340e1a2990f1f0ef7a2e328866ce05.tar.gz meson-e4330eff6d340e1a2990f1f0ef7a2e328866ce05.tar.bz2 |
Fix "test cases/common/125 object only target" on Solaris
If object is not built pic, trying to link it into libshr.so fails:
[6/8] Linking target libshr.so.
FAILED: libshr.so
gcc -o libshr.so 'shr@sha/source2.o' -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,libshr.so -Wl,--end-group
Text relocation remains referenced
against symbol offset in file
.text (section) 0x20 shr@sha/source2.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'test cases/common')
-rwxr-xr-x | test cases/common/125 object only target/obj_generator.py | 2 |
1 files changed, 2 insertions, 0 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)) |