]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
configure.ac: detect MIPS ABI
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>
Tue, 20 Jun 2017 15:42:11 +0000 (16:42 +0100)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 8 Mar 2018 02:02:48 +0000 (13:02 +1100)
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
configure.ac

index 68586a30db8e5bb482cbe09cab326121a60e52da..76a603d29ebd1f3b600dea3241d096623885844d 100644 (file)
@@ -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