From 2aab8e08065afcb30de54f6033dd1dc9064d3f41 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Thu, 14 Mar 2024 14:04:16 +0100 Subject: [PATCH] meson: Correctly get sizeof_pointer with cross-compilers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "native : true" used build system's compiler to determine sizeof void*, which is wrong - we need to use host compiler. Found when using pure NIX cross-compilation environment. Fixes: ad34c932cdf9583f27b35a948a90c37c45c27889 ("glapi: pass pointer size to python for glthread from meson") Signed-off-by: Danylo Piliaiev Reviewed-by: Marek Olšák --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d70046ed74c..fe3a7f334f8 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ project( cc = meson.get_compiler('c') cpp = meson.get_compiler('cpp') -sizeof_pointer = meson.get_compiler('c', native : true).sizeof('void*').to_string() +sizeof_pointer = cc.sizeof('void*').to_string() null_dep = dependency('', required : false)