From 0a90c5d778c1a583964f5ce1fab42dcd6da7768a Mon Sep 17 00:00:00 2001 From: DRC Date: Wed, 25 Sep 2013 04:36:44 +0000 Subject: [PATCH] Due to the way in which the configure script silently falls back to a non-SIMD build if SIMD can't be enabled, we accidentally released iOS ARM v7 and v7s binaries in 1.3.0 that did not contain NEON SIMD code, because gas-preprocessor.pl wasn't in the PATH. In order to prevent this from happening again, specifying --with-simd now has the effect of forcing a SIMD build, and if this argument is specified, any issues encountered while enabling SIMD are treated as fatal. --- configure.ac | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 0a51c1a1..d307456d 100644 --- a/configure.ac +++ b/configure.ac @@ -400,6 +400,10 @@ fi AC_ARG_WITH([simd], AC_HELP_STRING([--without-simd], [Do not include SIMD extensions])) if test "x${with_simd}" != "xno"; then + require_simd=no + if test "x${with_simd}" = "xyes"; then + require_simd=yes + fi # Check if we're on a supported CPU AC_MSG_CHECKING([if we have SIMD optimisations for cpu type]) case "$host_cpu" in @@ -420,8 +424,12 @@ if test "x${with_simd}" != "xno"; then [AC_MSG_RESULT([yes]) simd_arch=arm], [AC_MSG_RESULT([no]) - with_simd=no - AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])]) + with_simd=no]) + if test "x${require_simd}" = "xyes" -a "x${with_simd}" = "xno"; then + AC_MSG_ERROR([SIMD support can't be enabled.]) + else + AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.]) + fi ;; mipsel*) AC_MSG_RESULT([yes (mipsel)]) @@ -430,13 +438,21 @@ if test "x${with_simd}" != "xno"; then [AC_MSG_RESULT([yes]) simd_arch=mipsel], [AC_MSG_RESULT([no]) - with_simd=no - AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])]) + with_simd=no]) + if test "x${require_simd}" = "xyes" -a "x${with_simd}" = "xno"; then + AC_MSG_ERROR([SIMD support can't be enabled.]) + else + AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.]) + fi ;; *) AC_MSG_RESULT([no ("$host_cpu")]) - AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.]) with_simd=no; + if test "x${require_simd}" = "xyes" -a "x${with_simd}" = "xno"; then + AC_MSG_ERROR([SIMD support not available for this CPU.]) + else + AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.]) + fi ;; esac