summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2014-08-21 16:02:35 -0400
committerPaul Moore <pmoore@redhat.com>2014-08-21 16:02:35 -0400
commitb8969be8264cc10125406228b0e893f647dbc321 (patch)
tree61273c3cf6a458c43e79073d4e57c8d4b07cf9ca /tools
parent5a703f60136a2f375657446e1660904de1e39a85 (diff)
downloadlibseccomp-b8969be8264cc10125406228b0e893f647dbc321.tar.gz
tools: add the missing 64-bit MIPS support to tools/util.c
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/util.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/util.c b/tools/util.c
index cbb7866..4927faa 100644
--- a/tools/util.c
+++ b/tools/util.c
@@ -42,10 +42,24 @@
#endif /* __ILP32__ */
#elif __arm__
#define ARCH_NATIVE AUDIT_ARCH_ARM
-#elif __MIPSEB__
+#elif __mips__ && _MIPS_SIM == _MIPS_SIM_ABI32
+#if __MIPSEB__
#define ARCH_NATIVE AUDIT_ARCH_MIPS
#elif __MIPSEL__
#define ARCH_NATIVE AUDIT_ARCH_MIPSEL
+#endif /* _MIPS_SIM_ABI32 */
+#elif __mips__ && _MIPS_SIM == _MIPS_SIM_ABI64
+#if __MIPSEB__
+#define ARCH_NATIVE AUDIT_ARCH_MIPS64
+#elif __MIPSEL__
+#define ARCH_NATIVE AUDIT_ARCH_MIPSEL64
+#endif /* _MIPS_SIM_ABI64 */
+#elif __mips__ && _MIPS_SIM == _MIPS_SIM_NABI32
+#if __MIPSEB__
+#define ARCH_NATIVE AUDIT_ARCH_MIPS64N32
+#elif __MIPSEL__
+#define ARCH_NATIVE AUDIT_ARCH_MIPSEL64N32
+#endif /* _MIPS_SIM_NABI32 */
#else
#error the simulator code needs to know about your machine type
#endif