On Thursday, 2018-06-07 09:19:29 -0700, Dylan Baker wrote: > The reason we restrict the use of ASM when cross compiling is that there > is a C based generator (mtypes) that must be run as part of the build > process, and it must be built for the host architecture. In the case of > an x86 host and an x86_64 build machine this is possible as long as the > host and build OSes are the same (ie, not Windows -> Linux).
This would be great as a comment at the start of that block in meson.build ;) > > This also makes the commit message a bit more generic than it previously > was. > > CC: Mike Lothian <m...@fireburn.co.uk> > Fixes: 2d62fc06465281d3d45b8a7c7fd2b17ef718448c > ("meson: disable x86 asm in fewer cases.") > Signed-off-by: Dylan Baker <dylan.c.ba...@intel.com> > --- > > I've convinced myself this is correct, but it's a lot of logic to hold in my > head at 9am... > > meson.build | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/meson.build b/meson.build > index 4d4ca5d5578..31557d095dc 100644 > --- a/meson.build > +++ b/meson.build > @@ -846,9 +846,15 @@ endif > # TODO: it should be possible to use an exe_wrapper to run the binary during > # the build. > if meson.is_cross_build() > - if not (build_machine.cpu_family() == 'x86_64' and > host_machine.cpu_family() == 'x86' > - and build_machine.system() == host_machine.system()) > - message('Cross compiling to x86 from non-x86, disabling asm') > + if (build_machine.system() != host_machine.system() or > + not (build_machine.cpu_family() == 'x86_64' and > host_machine.cpu_family() == 'x86')) I'm 99% sure you're not changing the logic here :) If you drop the above, everything below is: Reviewed-by: Eric Engestrom <eric.engest...@intel.com> (with an appropriate commit message) > + # TODO: There may be other cases where the 64 bit version of the > + # architecture can run 32 bit binaries (aarch64 and armv7 for example) > + message(''' > + Cross compiling with non-binary compatible host and build systems. > + Either with a non-binary compatible architecture pair, or with > different > + host and build OSes.''' > + ) > with_asm = false > endif > endif > -- > 2.17.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev