mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +01:00
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
This commit is contained in:
parent
1bebba0430
commit
2d2e96dc51
@ -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
|
# Support for --add-symbol was added to LLVM objcopy in 2019
|
||||||
# (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for
|
# (https://reviews.llvm.org/D58234). FIXME: This test could be enabled for
|
||||||
# LLVM once that support is in a stable release.
|
# 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',
|
test_gresource_binary = custom_target('test5.gresource',
|
||||||
input : 'test5.gresource.xml',
|
input : 'test5.gresource.xml',
|
||||||
output : 'test5.gresource',
|
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',
|
test_resources_binary2 = custom_target('test_resources2.o',
|
||||||
input : test_resources_binary,
|
input : test_resources_binary,
|
||||||
output : 'test_resources2.o',
|
output : 'test_resources2.o',
|
||||||
command : ['objcopy',
|
command : [objcopy,
|
||||||
'--add-symbol','_g_binary_test1_resource_data=.data:0',
|
'--add-symbol','_g_binary_test1_resource_data=.data:0',
|
||||||
'@INPUT@',
|
'@INPUT@',
|
||||||
'@OUTPUT@'])
|
'@OUTPUT@'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user