Skip to content

Commit

Permalink
Merge pull request #50 from bmwiedemann/sse2
Browse files Browse the repository at this point in the history
Disable march=native for SSE2
  • Loading branch information
genivia-inc committed Jul 5, 2020
2 parents 0be8337 + e5413ee commit 03cfbd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7708,7 +7708,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports SSE2 intrinsics" >&5
$as_echo_n "checking whether ${CXX} supports SSE2 intrinsics... " >&6; }
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-march=native"
CXXFLAGS="-msse2"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <emmintrin.h>
Expand All @@ -7730,7 +7730,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msse2_ok" >&5
$as_echo "$msse2_ok" >&6; }
if test "x$msse2_ok" = "xyes"; then
SIMD_FLAGS="-march=native -msse2 -DHAVE_SSE2"
SIMD_FLAGS="-msse2 -DHAVE_SSE2"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ if test "x$with_no_sse2" = "xno"; then
AC_MSG_RESULT(no)
AC_MSG_CHECKING([whether ${CXX} supports SSE2 intrinsics])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-march=native"
CXXFLAGS="-msse2"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <emmintrin.h>]], [[__m128i n = _mm_set1_epi8(42);]])],
[msse2_ok=yes],
[msse2_ok=no])
CXXFLAGS=$save_CXXFLAGS
AC_MSG_RESULT($msse2_ok)
if test "x$msse2_ok" = "xyes"; then
SIMD_FLAGS="-march=native -msse2 -DHAVE_SSE2"
SIMD_FLAGS="-msse2 -DHAVE_SSE2"
fi
else
AC_MSG_RESULT(yes)
Expand Down

0 comments on commit 03cfbd8

Please sign in to comment.