diff options
author | Antoine Jacoutot <ajacoutot@openbsd.org> | 2019-03-05 10:29:53 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2019-03-11 06:02:17 +0000 |
commit | 03c0c3a8f41e7d9eaff582dbdf680154671a6263 (patch) | |
tree | 04452789ce17821d0fd1e94cb8d5f64677a40db9 /mesonbuild/compilers/c.py | |
parent | ca355a79fbec095fb72bce9126a8ef27ee61a808 (diff) | |
download | meson-03c0c3a8f41e7d9eaff582dbdf680154671a6263.zip meson-03c0c3a8f41e7d9eaff582dbdf680154671a6263.tar.gz meson-03c0c3a8f41e7d9eaff582dbdf680154671a6263.tar.bz2 |
Fix _get_patterns on OpenBSD
We need to account to the possible prefixes (empty or 'lib').
This allows both to work:
cc.find_library('foo')
cc.find_library('libfoo')
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 3f3aba8..31d6464 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -902,7 +902,8 @@ class CCompiler(Compiler): # is expensive. It's wrong in many edge cases, but it will match # correctly-named libraries and hopefully no one on OpenBSD names # their files libfoo.so.9a.7b.1.0 - patterns.append('lib{}.so.[0-9]*.[0-9]*') + for p in prefixes: + patterns.append(p + '{}.so.[0-9]*.[0-9]*') return patterns def get_library_naming(self, env, libtype, strict=False): |