configure.ac: enable_asm=yes when x-compiling across same X86 arch
authorDongwon Kim <dongwon.kim@intel.com>
Tue, 16 Feb 2016 18:05:24 +0000 (10:05 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 17 Mar 2016 23:53:23 +0000 (16:53 -0700)
Currently, configure script is forcing 'enable_asm' to be 'no'
whenever cross-compilation is performed on X86 host. This is
based on an assumption that target architecture is different
from host's (i.e. ARM). But there's always a case that we do
cross-compilation for target that is also X86 based just like
host in which same ASM codes will be supported. 'enable_asm'
should not be forced to be "no" anymore in this case.

v2: corrected commit message

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
configure.ac

index 31703b58301041f448fce8db983b8c1e48b483b2..1ece6fa4e162d10a8cf43b09bbb2def2eca957a3 100644 (file)
@@ -704,8 +704,10 @@ test "x$enable_asm" = xno && AC_MSG_RESULT([no])
 if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then
     case "$host_cpu" in
     i?86 | x86_64 | amd64)
-        enable_asm=no
-        AC_MSG_RESULT([no, cross compiling])
+        if test "x$host_cpu" != "x$target_cpu"; then
+            enable_asm=no
+            AC_MSG_RESULT([no, cross compiling])
+        fi
         ;;
     esac
 fi