From: Toon Claes Date: Tue, 2 Dec 2025 10:48:09 +0000 (+0100) Subject: meson: only detect ICONV_OMITS_BOM if possible X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=574ac610761495b7b7afcced7717188501402925;p=thirdparty%2Fgit.git meson: only detect ICONV_OMITS_BOM if possible In our Meson setup it automatically detects whether ICONV_OMITS_BOM should be defined. To check this, a piece of code is compiled and ran. When cross-compiling, it's not possible to run this piece of code. Guard this test with a can_run_host_binaries() check to ensure it can run. Signed-off-by: Toon Claes Acked-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/meson.build b/meson.build index f1b3615659..95348e69a4 100644 --- a/meson.build +++ b/meson.build @@ -1064,7 +1064,7 @@ if iconv.found() } ''' - if compiler.run(iconv_omits_bom_source, + if meson.can_run_host_binaries() and compiler.run(iconv_omits_bom_source, dependencies: iconv, name: 'iconv omits BOM', ).returncode() != 0