From 533997891ee364a45b0bd0af7f46b6dc03bd8772 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 22 Sep 2018 11:54:37 -0300 Subject: backend: Make sure to normalize paths before checking if it is a system dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise if we for some reason get '/usr/lib/../lib' in there we end up saying it is not a system path. And for some reason here I got: ``` $ pkg-config --libs libffi  148  ST 117   hotdoc -L/usr/lib/../lib -lffi ``` --- mesonbuild/backend/backends.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 0e7e8e0fe..78c28776d 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -361,6 +361,7 @@ class Backend: @staticmethod def _libdir_is_system(libdir, compilers, env): + libdir = os.path.normpath(libdir) for cc in compilers.values(): if libdir in cc.get_library_dirs(env): return True -- cgit v1.2.3