Module: Mesa
Branch: master
Commit: 8f2421d73be596c12019196189255f22fd3edb54
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f2421d73be596c12019196189255f22fd3edb54

Author: Dylan Baker <[email protected]>
Date:   Thu Jun  7 10:48:38 2018 -0700

meson: work around gentoo applying -m32 to host compiler in cross builds

Gentoo's ebuild system always adds -m32 to the compiler for doing x86_64
-> x86 cross builds, while meson expects it not to do that. This
results in an x86 -> x86 cross build, and assembly gets disabled.

Fixes: 2d62fc06465281d3d45b8a7c7fd2b17ef718448c
       ("meson: disable x86 asm in fewer cases.")
Signed-off-by: Dylan Baker <[email protected]>
Reviewed-by: Matt Turner <[email protected]>

---

 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 32ab30faa4..e6e2167ebe 100644
--- a/meson.build
+++ b/meson.build
@@ -852,7 +852,10 @@ if meson.is_cross_build()
     # TODO: It may be possible to do this with an exe_wrapper (like wine).
     message('Cross compiling from one OS to another, disabling assembly.')
     with_asm = false
-  elif not (build_machine.cpu_family() == 'x86_64' and 
host_machine.cpu_family() == 'x86')
+  elif not (build_machine.cpu_family().startswith('x86') and 
host_machine.cpu_family() == 'x86')
+    # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an
+    # x86 -> x86 cross compile. We use startswith rather than == to handle this
+    # case.
     # 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('''

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to