[PATCH] libosmocore[master]: configure.ac: fix build on systems without SIMD support

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Tue May 9 18:08:57 UTC 2017


Review at  https://gerrit.osmocom.org/2548

configure.ac: fix build on systems without SIMD support

HAVE_AVX2, HAVE_SSE3 and HAVE_SSE4_1 were never defined if CPU
architecture doesn't match the (86*|x86_64*|amd64*) condition.

Change-Id: If0c3128f9768f95c1f5f955db242e71c81384c6c
---
M m4/ax_check_simd.m4
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/48/2548/1

diff --git a/m4/ax_check_simd.m4 b/m4/ax_check_simd.m4
index d07d706..8a0ceb7 100644
--- a/m4/ax_check_simd.m4
+++ b/m4/ax_check_simd.m4
@@ -41,6 +41,10 @@
 [
   AC_REQUIRE([AC_CANONICAL_HOST])
 
+  AM_CONDITIONAL(HAVE_AVX2, false)
+  AM_CONDITIONAL(HAVE_SSE3, false)
+  AM_CONDITIONAL(HAVE_SSE4_1, false)
+
   case $host_cpu in
     i[[3456]]86*|x86_64*|amd64*)
       AX_CHECK_COMPILE_FLAG(-mavx2, ax_cv_support_avx2_ext=yes, [])
@@ -51,7 +55,6 @@
         AM_CONDITIONAL(HAVE_AVX2, true)
       else
         AC_MSG_WARN([Your compiler does not support AVX2 instructions])
-        AM_CONDITIONAL(HAVE_AVX2, false)
       fi
 
       AX_CHECK_COMPILE_FLAG(-msse3, ax_cv_support_sse3_ext=yes, [])
@@ -62,7 +65,6 @@
         AM_CONDITIONAL(HAVE_SSE3, true)
       else
         AC_MSG_WARN([Your compiler does not support SSE3 instructions])
-        AM_CONDITIONAL(HAVE_SSE3, false)
       fi
 
       AX_CHECK_COMPILE_FLAG(-msse4.1, ax_cv_support_sse41_ext=yes, [])
@@ -73,7 +75,6 @@
         AM_CONDITIONAL(HAVE_SSE4_1, true)
       else
         AC_MSG_WARN([Your compiler does not support SSE4.1 instructions])
-        AM_CONDITIONAL(HAVE_SSE4_1, false)
       fi
   ;;
   esac

-- 
To view, visit https://gerrit.osmocom.org/2548
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0c3128f9768f95c1f5f955db242e71c81384c6c
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list