[Spice-devel] [PATCH spice-common] meson: fix building for big-endian host
Victor Toso
victortoso at redhat.com
Thu Jan 17 08:45:59 UTC 2019
Hi,
On Thu, Jan 17, 2019 at 12:33:09PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Thu, Jan 17, 2019 at 11:43 AM Victor Toso <victortoso at redhat.com> wrote:
> >
> > Hi,
> >
> > On Thu, Jan 17, 2019 at 03:04:32AM +0400, marcandre.lureau at redhat.com wrote:
> > > 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.
> >
> > Indeed,
> >
> > > 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
> >
> > Shouldn't it be target_machine.endian() ?
>
> No
>
> https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md
>
> target_machine object
>
> Provides information about the target machine — the machine on which
> the compiled binary's output will run. Hence, this object should only
> be used while cross-compiling a compiler.
Ack
>
>
>
> >
> > > spice_common_generate_code = get_option('generate-code')
> > > spice_common_generate_client_code = spice_common_generate_code == 'all' or spice_common_generate_code == 'client'
> > > --
> > > 2.20.1.98.gecbdaf0899
> > >
> > > _______________________________________________
> > > Spice-devel mailing list
> > > Spice-devel at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
>
>
> --
> Marc-André Lureau
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190117/483a190d/attachment.sig>
More information about the Spice-devel
mailing list