diff options
author | Philip Withnall <withnall@endlessm.com> | 2019-10-28 12:08:48 +0000 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-10-28 12:08:48 +0000 |
commit | 2d2e96dc51d1b8ca1b24a2d0a60aef76127dac90 (patch) | |
tree | 5456bbc9d61321c5ebd3ad297e1aa13ba5f5f05e | |
parent | 1bebba043092a8cdfeb01d91f11828894ea13b80 (diff) | |
download | glib-2d2e96dc51d1b8ca1b24a2d0a60aef76127dac90.tar.gz |
tests: Use objcopy from the cross-compilation file, if configured
Otherwise we’ll end up using the host’s `objcopy`, which will output
object files in the wrong format.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #1916
-rw-r--r-- | gio/tests/meson.build | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gio/tests/meson.build b/gio/tests/meson.build index b5593a4ec..382dfccad 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -577,7 +577,9 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() # Support for --add-symbol was added to LLVM objcopy in 2019 # (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for # LLVM once that support is in a stable release. - if build_machine.system() == 'linux' and cc.get_id() == 'gcc' + objcopy = find_program('objcopy', required : false) + + if build_machine.system() == 'linux' and cc.get_id() == 'gcc' and objcopy.found() test_gresource_binary = custom_target('test5.gresource', input : 'test5.gresource.xml', output : 'test5.gresource', @@ -616,7 +618,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() test_resources_binary2 = custom_target('test_resources2.o', input : test_resources_binary, output : 'test_resources2.o', - command : ['objcopy', + command : [objcopy, '--add-symbol','_g_binary_test1_resource_data=.data:0', '@INPUT@', '@OUTPUT@']) |