summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-07-09 09:45:02 -0700
committerGitHub <noreply@github.com>2018-07-09 09:45:02 -0700
commit8cfb8fd02c86e1667ded9a7841d77204f96a4a6d (patch)
tree8f268877d97a6fd07631353a01d0594442315dd0 /mesonbuild/compilers/fortran.py
parent28a2e658f884443ae0afbf3ea8929c8c2005b34c (diff)
downloadmeson-8cfb8fd02c86e1667ded9a7841d77204f96a4a6d.tar.gz
Fix searching of shared libraries on OpenBSD (#3851)
* get_library_naming: Use templates instead of suffix/prefix pairs This commit does not change functionality, and merely sets the groundwork for a more flexibly naming implementation. * find_library: Fix manual searching on OpenBSD On OpenBSD, shared libraries are called libfoo.so.X.Y where X is the major version and Y is the minor version. We were assuming that it's libfoo.so and not finding shared libraries at all while doing manual searching, which meant we'd link statically instead. See: https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs Now we use file globbing to do searching, and pick the first one that's a real file. Closes https://github.com/mesonbuild/meson/issues/3844 * find_library: Fix priority of library search in OpenBSD Also add unit tests for the library naming function so that it's absolutely clear what the priority list of naming is. Testing is done with mocking on Linux to ensure that local testing is easy
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
-rw-r--r--mesonbuild/compilers/fortran.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
index 6254a6aa5..d6e41e3bd 100644
--- a/mesonbuild/compilers/fortran.py
+++ b/mesonbuild/compilers/fortran.py
@@ -173,8 +173,11 @@ class FortranCompiler(Compiler):
def run(self, code, env, extra_args=None, dependencies=None):
return CCompiler.run(self, code, env, extra_args, dependencies)
- def get_library_naming(self, env, libtype, strict=False):
- return CCompiler.get_library_naming(self, env, libtype, strict)
+ def _get_patterns(self, *args, **kwargs):
+ return CCompiler._get_patterns(self, *args, **kwargs)
+
+ def get_library_naming(self, *args, **kwargs):
+ return CCompiler.get_library_naming(self, *args, **kwargs)
def find_library_real(self, *args):
return CCompiler.find_library_real(self, *args)