summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2018-01-03 17:24:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-04 12:57:43 +0000
commit0d40074b7c29a812faaabf38d47a0ab549bd56c7 (patch)
tree952ccd7b6cccf8c89d33b472fd7321e02e76c022 /meta/recipes-gnome
parenta91b286291c7401c5788c45a68f13f690f1a6d15 (diff)
downloadpoky-0d40074b7c29a812faaabf38d47a0ab549bd56c7.tar.gz
gobject-introspection: do not export LD_LIBRARY_PATH prior to running qemu
Latest g-i upstream adds target paths to this variable which breaks qemu in various confusing ways. Instead, the list of target library paths is exported to GIR_EXTRA_LIBS_PATH, so that it can be picked up automatically by the qemu wrapper script and given to qemu (manually setting this variable from various recipes will be removed in a different patch). Also, re-enable parts of g-i on mips64, as it is the same issue. (From OE-Core rev: 58d31dddebbf7116e71bf45bd374a7a988f6016c) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome')
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch73
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb3
2 files changed, 75 insertions, 1 deletions
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
new file mode 100644
index 0000000000..e1776bc9b4
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-lib-dirs-envvar-option.patch
@@ -0,0 +1,73 @@
1From a02076fe916ade6c3f78f6d35072ec53482e9446 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 3 Jan 2018 17:02:01 +0200
4Subject: [PATCH] giscanner: add a --lib-dirs-envvar option
5
6By default LD_LIBRARY_PATH is set to the list of target library paths;
7this breaks down in cross-compilation environment, as we need to run a
8native emulation wrapper rather than the target binary itself. This patch
9allows exporting those paths to a different environment variable
10which can be picked up and used by the wrapper.
11
12Upstream-Status: Pending
13Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
14---
15 giscanner/ccompiler.py | 6 ++++--
16 giscanner/dumper.py | 3 ++-
17 giscanner/scannermain.py | 3 +++
18 3 files changed, 9 insertions(+), 3 deletions(-)
19
20diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
21index 29de0ee..e969337 100644
22--- a/giscanner/ccompiler.py
23+++ b/giscanner/ccompiler.py
24@@ -109,14 +109,16 @@ class CCompiler(object):
25
26 self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
27
28- def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
29+ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar):
30 # An "internal" link is where the library to be introspected
31 # is being built in the current directory.
32
33 runtime_path_envvar = []
34 runtime_paths = []
35
36- if self.check_is_msvc():
37+ if lib_dirs_envvar:
38+ runtime_path_envvar = [lib_dirs_envvar]
39+ elif self.check_is_msvc():
40 runtime_path_envvar = ['LIB', 'PATH']
41 else:
42 runtime_path_envvar = ['LD_LIBRARY_PATH']
43diff --git a/giscanner/dumper.py b/giscanner/dumper.py
44index 7f77bd2..db96df6 100644
45--- a/giscanner/dumper.py
46+++ b/giscanner/dumper.py
47@@ -259,7 +259,8 @@ class DumpCompiler(object):
48 libtool,
49 self._options.libraries,
50 self._options.extra_libraries,
51- self._options.library_paths)
52+ self._options.library_paths,
53+ self._options.lib_dirs_envvar)
54 args.extend(pkg_config_libs)
55
56 else:
57diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
58index 38a45c1..b603850 100755
59--- a/giscanner/scannermain.py
60+++ b/giscanner/scannermain.py
61@@ -130,6 +130,9 @@ def _get_option_parser():
62 parser.add_option("", "--use-ldd-wrapper",
63 action="store", dest="ldd_wrapper", default=None,
64 help="wrapper to use instead of ldd (useful when cross-compiling)")
65+ parser.add_option("", "--lib-dirs-envvar",
66+ action="store", dest="lib_dirs_envvar", default=None,
67+ help="environment variable to write a list of library directories to (for running the transient binary), instead of standard LD_LIBRARY_PATH")
68 parser.add_option("", "--program-arg",
69 action="append", dest="program_args", default=[],
70 help="extra arguments to program")
71--
722.15.1
73
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
index 156dac7ca7..85c8001dea 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.54.1.bb
@@ -14,6 +14,7 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/1.54/${BPN}-${PV}.tar.xz \
14 file://0003-giscanner-add-use-binary-wrapper-option.patch \ 14 file://0003-giscanner-add-use-binary-wrapper-option.patch \
15 file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \ 15 file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \
16 file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \ 16 file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
17 file://0001-giscanner-add-a-lib-dirs-envvar-option.patch \
17 " 18 "
18SRC_URI[md5sum] = "126c29e4d54adbed2ed4e2b04483de41" 19SRC_URI[md5sum] = "126c29e4d54adbed2ed4e2b04483de41"
19SRC_URI[sha256sum] = "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e" 20SRC_URI[sha256sum] = "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e"
@@ -71,7 +72,7 @@ EOF
71# This prevents g-ir-scanner from writing cache data to $HOME 72# This prevents g-ir-scanner from writing cache data to $HOME
72export GI_SCANNER_DISABLE_CACHE=1 73export GI_SCANNER_DISABLE_CACHE=1
73 74
74g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@" 75g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
75EOF 76EOF
76 chmod +x ${B}/g-ir-scanner-wrapper 77 chmod +x ${B}/g-ir-scanner-wrapper
77 78