From e3cc29cc79d4e94d0144c3ebc4d8cf00d4ee2e70 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 11 Jan 2021 12:54:37 -0600 Subject: [PATCH] meson.eclass: fix machine files Several options we were setting in the [properties] section of the machine files have been moved to the [built-in options] section in meson 0.56. Closes: https://bugs.gentoo.org/738710 Signed-off-by: William Hubbs --- eclass/meson.eclass | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 67b7ca831fd2e..7e17c3bd65437 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -120,7 +120,7 @@ _meson_env_array() { # @FUNCTION: _meson_get_machine_info # @USAGE: -# @RETURN: system/cpu_family/cpu variables +# @RETURN: system/cpu_family/cpu/builtin_options variables # @INTERNAL # @DESCRIPTION: # Translate toolchain tuple into machine values for meson. @@ -146,6 +146,17 @@ _meson_get_machine_info() { # This may require adjustment based on CFLAGS cpu=${tuple%%-*} + + local ver_opt + case "${EAPI}" in + 6) ver_opt=--host-route ;; + *) ver_opt=-b ;; + esac + if has_version "${ver_opt}" ' "${fn}" <<-EOF [binaries] ar = $(_meson_env_array "$(tc-getBUILD_AR)") @@ -225,7 +235,7 @@ _meson_create_native_file() { strip = $(_meson_env_array "$(tc-getBUILD_STRIP)") windres = $(_meson_env_array "$(tc-getBUILD_PROG RC windres)") - [properties] + ${builtin_options} c_args = $(_meson_env_array "${BUILD_CFLAGS} ${BUILD_CPPFLAGS}") c_link_args = $(_meson_env_array "${BUILD_CFLAGS} ${BUILD_LDFLAGS}") cpp_args = $(_meson_env_array "${BUILD_CXXFLAGS} ${BUILD_CPPFLAGS}")