Don't compile anything with -msse4.2 unless the compiler supports it.
This includes ws_mempbrk_sse42.c; if the compiler doesn't support -msse4.2, HAS_SSE4_2 isn't defined, so all the stuff in ws_mempbrk_sse42.c that uses SSE 4.2 will be #ifdeffed out. Not all compilers with which we're built will support -msse4.2; in particular, the ones that aren't compiling for x86 won't.... Change-Id: I69566ca06f602104b40c78b3b06fcb7dfeb054b2 Reviewed-on: https://code.wireshark.org/review/2373 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
7939f6888b
commit
421d817d70
|
@ -981,6 +981,7 @@ then
|
|||
[
|
||||
have_sse42=yes
|
||||
AC_DEFINE(HAVE_SSE4_2, 1, [Support SSSE4.2 (Streaming SIMD Extensions 4.2) instructions])
|
||||
CFLAGS_SSE42="-msse4.2"
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
|
@ -996,6 +997,7 @@ else
|
|||
fi
|
||||
dnl build libwsutil_sse42 only if there is SSE4.2
|
||||
AM_CONDITIONAL(SSE42_SUPPORTED, test "x$have_sse42" = "xyes")
|
||||
AC_SUBST(CFLAGS_SSE42)
|
||||
|
||||
#
|
||||
# If we're running GCC or clang define _U_ to be "__attribute__((unused))"
|
||||
|
|
|
@ -83,7 +83,7 @@ libwsutil_la_SOURCES = \
|
|||
libwsutil_sse42_la_SOURCES = \
|
||||
ws_mempbrk_sse42.c
|
||||
|
||||
libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) -msse4.2
|
||||
libwsutil_sse42_la_CFLAGS = $(AM_CFLAGS) @CFLAGS_SSE42@
|
||||
|
||||
EXTRA_libwsutil_la_SOURCES= \
|
||||
inet_aton.c \
|
||||
|
|
Loading…
Reference in New Issue