summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorModestas Vainius <modax@debian.org>2012-02-20 14:39:03 (GMT)
committerBrad King <brad.king@kitware.com>2012-02-20 14:43:36 (GMT)
commitaabf65a073e812afd9ba417fd56c25017166a43e (patch)
tree8f29667ad04b4f7c7d277337bc776e881300d8e0
parentb421c2477c4c4f9d4c93997661f1698812cdae36 (diff)
downloadCMake-aabf65a073e812afd9ba417fd56c25017166a43e.zip
CMake-aabf65a073e812afd9ba417fd56c25017166a43e.tar.gz
CMake-aabf65a073e812afd9ba417fd56c25017166a43e.tar.bz2
KWIML: Teach ABI.h that MIPS is biendian
MIPS machines are biendian hence they can run both big endian kernels e.g. Debian mips architecture, and little endian kernels e.g. Debian mipsel architecture. Use predefined macros to distinguish them.
-rw-r--r--ABI.h.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/ABI.h.in b/ABI.h.in
index e95a4ff..e85a1c5 100644
--- a/ABI.h.in
+++ b/ABI.h.in
@@ -380,7 +380,15 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
#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