[glib/wip/smcv/cross-ld] Make ld executable configurable
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/smcv/cross-ld] Make ld executable configurable
- Date: Mon, 4 Nov 2019 10:25:23 +0000 (UTC)
commit ef124411aa4acd24117c95f154caba5a5fbb3034
Author: Simon McVittie <smcv collabora com>
Date: Mon Nov 4 10:24:15 2019 +0000
Make ld executable configurable
Tools like this should be configurable in a cross or native file. In
particular, if we are cross-compiling (with an executable wrapper like
qemu-arm), the build system ld is not necessarily able to manipulate
host system objects.
Signed-off-by: Simon McVittie <smcv collabora com>
docs/reference/glib/cross.xml | 1 +
gio/tests/meson.build | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/glib/cross.xml b/docs/reference/glib/cross.xml
index 977421faa..c90b30b36 100644
--- a/docs/reference/glib/cross.xml
+++ b/docs/reference/glib/cross.xml
@@ -59,6 +59,7 @@ c_link_args = []
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
+ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 2c84a20f3..8b5d105f5 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -586,8 +586,9 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
# (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for
# LLVM once that support is in a stable release.
objcopy = find_program('objcopy', required : false)
+ ld = find_program('ld', required : false)
- if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found()
+ if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() and ld.found()
test_gresource_binary = custom_target('test5.gresource',
input : 'test5.gresource.xml',
output : 'test5.gresource',
@@ -616,7 +617,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
test_resources_binary = custom_target('test_resources.o',
input : test_gresource_binary,
output : 'test_resources.o',
- command : ['ld',
+ command : [ld,
'-r',
'-b','binary',
'@INPUT@',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]