[gobject-introspection] g-ir-scanner: fix wrong order of -L options in libtool invocation



commit d95834ca0e5ccaa00ea2d28129ca8e89d37641f7
Author: Sebastian Geiger <sbastig gmx net>
Date:   Sat Feb 11 21:44:29 2017 +0100

    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 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index f48fcc1..793177b 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...


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]