From: Matthias Clasen Date: Fri, 28 Jul 2023 06:05:03 +0000 (+0300) Subject: build: Check for objcopy options X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~29^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c61313cbfe92d5a34f3d9ee92170a7bab95d3d76;p=gtk4.git build: Check for objcopy options Check that objcopy understands the --set-section-alignment option that we are now using. --- diff --git a/meson.build b/meson.build index ee75e706c7..4e9d7ca1fa 100644 --- a/meson.build +++ b/meson.build @@ -742,9 +742,11 @@ build_gir = gir.found() and (get_option('introspection').enabled() or glib_compile_resources = find_program('glib-compile-resources') objcopy_supports_add_symbol = false +objcopy_supports_section_alignment = false objcopy = find_program('objcopy', required : false) if objcopy.found() objcopy_supports_add_symbol = run_command(objcopy, '--help', check: false).stdout().contains('--add-symbol') + objcopy_supports_section_alignment = run_command(objcopy, '--help', check: false).stdout().contains('--set-section-alignment') endif ld_is_bfd = false @@ -753,7 +755,7 @@ if ld.found() ld_is_bfd = run_command(ld, '--version', check: false).stdout().contains('GNU ld') endif -if not meson.is_cross_build() and build_machine.cpu_family() == 'x86_64' and build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found() and ld_is_bfd +if not meson.is_cross_build() and build_machine.cpu_family() == 'x86_64' and build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and objcopy_supports_section_alignment and ld.found() and ld_is_bfd can_use_objcopy_for_resources = true else can_use_objcopy_for_resources = false