diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2019-10-28 20:06:50 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2019-10-28 20:06:50 +0000 |
commit | 61f693fb21f11f759dacc9477eb3af58fd1d482a (patch) | |
tree | 730d41cacf7dd97dc03e6d32e61068a580348be7 | |
parent | 434dbf08233f36022fede19b618e4decb67320d1 (diff) | |
parent | 57aaee76d5db2e7692820f62a8edabf8b7611dfe (diff) | |
download | glib-61f693fb21f11f759dacc9477eb3af58fd1d482a.tar.gz |
Merge branch '1916-objcopy-cross-compilation' into 'master'
tests: Use objcopy from the cross-compilation file, if configured
Closes #1916
See merge request GNOME/glib!1188
-rw-r--r-- | .gitlab-ci/cross_file_mingw64.txt | 1 | ||||
-rw-r--r-- | docs/reference/glib/cross.xml | 1 | ||||
-rw-r--r-- | gio/tests/meson.build | 6 |
3 files changed, 6 insertions, 2 deletions
diff --git a/.gitlab-ci/cross_file_mingw64.txt b/.gitlab-ci/cross_file_mingw64.txt index 1897b686a..1029b6db1 100644 --- a/.gitlab-ci/cross_file_mingw64.txt +++ b/.gitlab-ci/cross_file_mingw64.txt @@ -12,6 +12,7 @@ c_link_args = [] c = 'x86_64-w64-mingw32-gcc' cpp = 'x86_64-w64-mingw32-g++' ar = 'x86_64-w64-mingw32-ar' +objcopy = 'x86_64-w64-mingw32-objcopy' strip = 'x86_64-w64-mingw32-strip' pkgconfig = 'x86_64-w64-mingw32-pkg-config' windres = 'x86_64-w64-mingw32-windres' diff --git a/docs/reference/glib/cross.xml b/docs/reference/glib/cross.xml index 50e7ba675..977421faa 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' +objcopy = 'x86_64-w64-mingw32-objcopy' strip = 'x86_64-w64-mingw32-strip' pkgconfig = 'x86_64-w64-mingw32-pkg-config' windres = 'x86_64-w64-mingw32-windres' 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@']) |