[Spice-devel] [PATCH spice-common] meson: fix building for big-endian host
Frediano Ziglio
fziglio at redhat.com
Thu Jan 17 08:14:57 UTC 2019
>
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
>
> autofoo build-sys defines WORDS_BIGENDIAN, and spice-common code uses it.
>
> Later, I think it would make sense to switch to G_BIG_ENDIAN instead.
>
This comment should not be in the commit message.
IMHO WORDS_BIGENDIAN is fine, is pretty standard and Meson is currently
providing definitions in the Autoconf style as it's quite standard.
> Fixes:
> https://gitlab.freedesktop.org/spice/spice-common/issues/2
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
> ---
> meson.build | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meson.build b/meson.build
> index 049409b..8579680 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -33,6 +33,9 @@ spice_common_config_data = configuration_data()
> if get_option('extra-checks')
> spice_common_config_data.set('ENABLE_EXTRA_CHECKS', '1')
> endif
> +if host_machine.endian() == 'big'
> + spice_common_config_data.set('WORDS_BIGENDIAN', '1')
> +endif
>
> spice_common_generate_code = get_option('generate-code')
> spice_common_generate_client_code = spice_common_generate_code == 'all' or
> spice_common_generate_code == 'client'
Frediano
More information about the Spice-devel
mailing list