summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>2017-06-20 16:42:11 +0100
committerDarren Tucker <dtucker@dtucker.net>2018-03-08 13:02:48 +1100
commit580086704c31de91dc7ba040a28e416bf1fefbca (patch)
tree98c9785af5259b7ddae926d1ef272ac62156f5d1
parentcd4e937aa701f70366cd5b5969af525dff6fdf15 (diff)
configure.ac: detect MIPS ABI
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 68586a30..76a603d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -819,6 +819,27 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
])
AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
[], [#include <linux/types.h>])
+ # Obtain MIPS ABI
+ case "$host" in
+ mips*)
+ AC_COMPILE_IFELSE([
+#if _MIPS_SIM != _ABIO32
+#error
+#endif
+ ],[mips_abi="o32"],[AC_COMPILE_IFELSE([
+#if _MIPS_SIM != _ABIN32
+#error
+#endif
+ ],[mips_abi="n32"],[AC_COMPILE_IFELSE([
+#if _MIPS_SIM != _ABI64
+#error
+#endif
+ ],[mips_abi="n64"],[AC_MSG_ERROR([unknown MIPS ABI])
+ ])
+ ])
+ ])
+ ;;
+ esac
AC_MSG_CHECKING([for seccomp architecture])
seccomp_audit_arch=
case "$host" in