From c98f155209c59d677cb88b54ed7707b3f5daf2d5 Mon Sep 17 00:00:00 2001 From: Tom Tsou Date: Wed, 26 Jul 2017 12:01:06 -0700 Subject: build: Enable SSSE3 sc12 converters by build switch only The existence of SSSE3 intrinsic headers is not a sufficient condition that SSSE3 support is available, which may lead to 'illegal instruction' runtime failuire on some platforms. Major OS distributions (Ubuntu, Fedora, etc.) include x86_64 intrinsic headers, though the underlying architecture may or may not support the instruction set. Assuming SSE2 availability is safe as instructions are present on all x86_64 architectures for which instrinsic headers would be present. The same cannot be said for SSSE3. Issue: #1761 --- host/lib/convert/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib/convert') diff --git a/host/lib/convert/CMakeLists.txt b/host/lib/convert/CMakeLists.txt index cfd3c7f34..786b4f42f 100644 --- a/host/lib/convert/CMakeLists.txt +++ b/host/lib/convert/CMakeLists.txt @@ -35,9 +35,11 @@ SET(CMAKE_REQUIRED_FLAGS ${EMMINTRIN_FLAGS}) CHECK_INCLUDE_FILE_CXX(emmintrin.h HAVE_EMMINTRIN_H) SET(CMAKE_REQUIRED_FLAGS) +IF(ENABLE_SSSE3) SET(CMAKE_REQUIRED_FLAGS ${TMMINTRIN_FLAGS}) CHECK_INCLUDE_FILE_CXX(tmmintrin.h HAVE_TMMINTRIN_H) SET(CMAKE_REQUIRED_FLAGS) +ENDIF(ENABLE_SSSE3) IF(HAVE_EMMINTRIN_H) SET(convert_with_sse2_sources -- cgit v1.2.3