[gobject-introspection] giscanner: add a --use-ldd-wrapper option
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: add a --use-ldd-wrapper option
- Date: Tue, 17 Dec 2019 17:06:41 +0000 (UTC)
commit c363b8b2a44f216d2481377cfd6c66655270ba73
Author: Alexander Kanavin <alex kanavin gmail com>
Date: Fri Oct 30 16:28:46 2015 +0200
giscanner: add a --use-ldd-wrapper option
This is useful in cross-compile environments where system's ldd
command does not work on binaries built for a different architecture
Signed-off-by: Alexander Kanavin <alex kanavin gmail com>
giscanner/scannermain.py | 3 +++
giscanner/shlibs.py | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index e6c7b47e..4aeb4172 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -123,6 +123,9 @@ def _get_option_parser():
parser.add_option("", "--use-binary-wrapper",
action="store", dest="wrapper", default=None,
help="wrapper to use for running programs (useful when cross-compiling)")
+ parser.add_option("", "--use-ldd-wrapper",
+ action="store", dest="ldd_wrapper", default=None,
+ help="wrapper to use instead of ldd (useful when cross-compiling)")
parser.add_option("", "--program-arg",
action="append", dest="program_args", default=[],
help="extra arguments to program")
diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
index b7c34dc8..9f8ab5df 100644
--- a/giscanner/shlibs.py
+++ b/giscanner/shlibs.py
@@ -97,7 +97,9 @@ def _resolve_non_libtool(options, binary, libraries):
args.extend(libtool)
args.append('--mode=execute')
platform_system = platform.system()
- if platform_system == 'Darwin':
+ if options.ldd_wrapper:
+ args.extend([options.ldd_wrapper, binary.args[0]])
+ elif platform_system == 'Darwin':
args.extend(['otool', '-L', binary.args[0]])
else:
args.extend(['ldd', binary.args[0]])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]