From: Matthias Clasen Date: Wed, 28 Jun 2023 20:54:34 +0000 (-0400) Subject: build: Try harder to work with nongnu ld X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~85^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1d1f35576a137dc36c63a5958a81d6135ab21f25;p=gtk4.git build: Try harder to work with nongnu ld Only try to be fast with gnu ld. --- diff --git a/meson.build b/meson.build index 19e0d96fba..b7717e18c9 100644 --- a/meson.build +++ b/meson.build @@ -746,9 +746,13 @@ if objcopy.found() objcopy_supports_add_symbol = run_command(objcopy, '--help', check: false).stdout().contains('--add-symbol') endif -ld = find_program('ld.bfd', 'ld', required : false) +ld_is_bfd = false +ld = find_program('ld', required : false) +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() +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 can_use_objcopy_for_resources = true else can_use_objcopy_for_resources = false