ARM EABI: disable OABI support by default

OABI is rarely used in ARM EABI systems nowadays, so disable its support
by default.  Add --enable-arm-oabi option to enable ARM OABI support.

* configure.ac: New option --enable-arm-oabi.
* syscall.c (get_scno) [ARM]: Check ENABLE_ARM_OABI macro defined by
configure instead of undocumented STRACE_KNOWS_ONLY_EABI macro.
diff --git a/configure.ac b/configure.ac
index 39832ef..11d9be8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,6 +150,18 @@
 
 AC_INCLUDEDIR
 
+AC_ARG_ENABLE([arm-oabi],
+	      [AS_HELP_STRING([--enable-arm-oabi],
+			      [enable OABI support on ARM EABI])],
+	      [], [enable_arm_oabi=no])
+case "$enable_arm_oabi" in
+	yes) enable_arm_oabi=1 ;;
+	no) enable_arm_oabi=0 ;;
+	*) AC_MSG_ERROR([bad value $enable_arm_oabi for arm-oabi option]) ;;
+esac
+AC_DEFINE_UNQUOTED([ENABLE_ARM_OABI], [$enable_arm_oabi],
+		   [Define to 1 if you want OABI support on ARM EABI.])
+
 gl_WARN_ADD([-Wall])
 gl_WARN_ADD([-Wwrite-strings])
 AC_ARG_ENABLE([gcc-Werror],
diff --git a/syscall.c b/syscall.c
index 5c4b42e..0a4e15d 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1360,8 +1360,7 @@
 	}
 	/* Note: we support only 32-bit CPUs, not 26-bit */
 
-# ifndef STRACE_KNOWS_ONLY_EABI
-# warning STRACE_KNOWS_ONLY_EABI not set, will PTRACE_PEEKTEXT on every syscall (slower tracing)
+# if !defined(__ARM_EABI__) || ENABLE_ARM_OABI
 	if (arm_regs.ARM_cpsr & 0x20)
 		/* Thumb mode */
 		goto scno_in_r7;
@@ -1385,7 +1384,7 @@
  scno_in_r7:
 		scno = arm_regs.ARM_r7;
 	}
-# else
+# else /* __ARM_EABI__ || !ENABLE_ARM_OABI */
 	scno = arm_regs.ARM_r7;
 # endif
 	scno = shuffle_scno(scno);