From: DRC Date: Fri, 1 Sep 2017 13:52:21 +0000 (+0000) Subject: Build: Use -maltivec when testing AltiVec support X-Git-Tag: 1.5.90~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d93541617d150b05ec89dc428c130c8efdf5db8;p=libjpeg-turbo Build: Use -maltivec when testing AltiVec support Doesn't seem to be necessary with recent Linux/GCC configurations, but it is definitely necessary with OS X. --- diff --git a/simd/CMakeLists.txt b/simd/CMakeLists.txt index 252d238..3976a58 100755 --- a/simd/CMakeLists.txt +++ b/simd/CMakeLists.txt @@ -284,6 +284,8 @@ endif() elseif(CPU_TYPE STREQUAL "powerpc") +set(CMAKE_REQUIRED_FLAGS -maltivec) + check_c_source_compiles(" #include int main(void) { @@ -291,6 +293,8 @@ check_c_source_compiles(" return vi[0]; }" HAVE_ALTIVEC) +unset(CMAKE_REQUIRED_FLAGS) + if(NOT HAVE_ALTIVEC) simd_fail("SIMD extensions not available for this CPU (PowerPC SPE)") return()