cmake/debian/patches/mipsel_is_little_endian.diff
Modestas Vainius 4f2ae6f526 Properly detect mipsel as little endian architecture.
Fixes FTBFS (patch mipsel_is_little_endian.diff).
2012-02-19 13:40:30 +02:00

27 lines
926 B
Diff

From: Modestas Vainius <modax@debian.org>
Subject: KWIML: detect little endian ABI on MIPSEL
Forwarded: yes
Bug: http://public.kitware.com/Bug/view.php?id=12982
Last-Update: 2012-02-19
Origin: vendor
--- a/Utilities/KWIML/ABI.h.in
+++ b/Utilities/KWIML/ABI.h.in
@@ -380,7 +380,15 @@ suppression macro @KWIML@_ABI_NO_VERIFY
#elif defined(__m68k__) || defined(M68000)
# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
-/* MIPS */
+/* MIPSel (MIPS little endian) */
+#elif defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
+
+/* MIPSeb (MIPS big endian) */
+#elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB)
+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
+
+/* MIPS (fallback, big endian) */
#elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG