meson: fix mips cpu_family test
authorJames Cowgill <jcowgill@debian.org>
Fri, 6 Apr 2018 14:38:54 +0000 (15:38 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 9 Apr 2018 11:57:33 +0000 (12:57 +0100)
The cpu family "mipsel" does not exist in meson so the current test to
enable the HAVE_MIPSEL macro is always false. The real cpu family is
"mips" but this also matches big endian platforms so also check that the
endian is little.

https://bugzilla.gnome.org/attachment.cgi?id=370595

meson.build

index 7f88bb0..673fe80 100644 (file)
@@ -42,7 +42,7 @@ elif cpu_family == 'powerpc'
   cdata.set('HAVE_POWERPC', true)
 elif cpu_family == 'arm'
   cdata.set('HAVE_ARM', true)
-elif cpu_family == 'mipsel'
+elif cpu_family == 'mips' and host_machine.endian() == 'little'
   cdata.set('HAVE_MIPSEL', true)
 endif