diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-14 22:45:13 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-14 22:53:04 +0200 |
commit | d5535065bc1559968ee76a1c08b05ebe5e636c4d (patch) | |
tree | 4d96db3a55e098fcbbd1fd844717580ca6bb5aa2 /mesonbuild/linkers/linkers.py | |
parent | c7a0c5cde4284d5c4fdd0bdf249f95144daad5a6 (diff) | |
download | meson-d5535065bc1559968ee76a1c08b05ebe5e636c4d.zip meson-d5535065bc1559968ee76a1c08b05ebe5e636c4d.tar.gz meson-d5535065bc1559968ee76a1c08b05ebe5e636c4d.tar.bz2 |
do not add SONAME to shared modules
For an ELF targets, shared_module() builds a module with SONAME field
(using -Wl,-soname argument). This is wrong: only the shared_library()
needs SONAME, while shared_module() does not. Moreover, tools such as
debian's dpkg-shlibdeps use presence of SONAME field as an indicator
that this is shared library as opposed to shared module (e.g., for the
module it is okay to have unresolved symbols which are imported from
the executable which loads the module, while a library should have all
symbols resolved).
This was in fact already the behavior on Darwin; extend it to ELF
targets as well.
Fixes: #8746
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/linkers/linkers.py')
-rw-r--r-- | mesonbuild/linkers/linkers.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index c26edda..0aa4105 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -751,8 +751,6 @@ class AppleDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str, suffix: str, soversion: str, darwin_versions: T.Tuple[str, str], is_shared_module: bool) -> T.List[str]: - if is_shared_module: - return [] install_name = ['@rpath/', prefix, shlib_name] if soversion is not None: install_name.append('.' + soversion) |