From d95834ca0e5ccaa00ea2d28129ca8e89d37641f7 Mon Sep 17 00:00:00 2001 From: Sebastian Geiger Date: Sat, 11 Feb 2017 21:44:29 +0100 Subject: g-ir-scanner: fix wrong order of -L options in libtool invocation This patch fixes an issue in dumper.py, which causes a wrong oder of -L options to be passed to libtool. This in turn can cause build failures if old library files are present in the linked library directories. https://bugzilla.gnome.org/show_bug.cgi?id=778507 --- giscanner/dumper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/giscanner/dumper.py b/giscanner/dumper.py index f48fcc11..793177b0 100644 --- a/giscanner/dumper.py +++ b/giscanner/dumper.py @@ -237,8 +237,6 @@ class DumpCompiler(object): args.append(cppflag) for cflag in shlex.split(os.environ.get('CFLAGS', '')): args.append(cflag) - for ldflag in shlex.split(os.environ.get('LDFLAGS', '')): - args.append(ldflag) # Make sure to list the library to be introspected first since it's # likely to be uninstalled yet and we want the uninstalled RPATHs have @@ -267,6 +265,10 @@ class DumpCompiler(object): libtool, self._options.libraries) + if not self._compiler.check_is_msvc(): + for ldflag in shlex.split(os.environ.get('LDFLAGS', '')): + args.append(ldflag) + if not libtool: # non-libtool: prepare distutils for linking the introspection # dumper program... -- cgit v1.2.1