aboutsummaryrefslogtreecommitdiff
Disable CPU optimizations not supported by all x86_64 systems.

--- a/cmake/modules/SIMDExt.cmake	2017-03-23 22:22:58.254071694 +0100
+++ b/cmake/modules/SIMDExt.cmake	2017-03-23 22:23:22.446848845 +0100
@@ -5,11 +5,6 @@
 # HAVE_ARM_NEON
 # HAVE_INTEL_SSE
 # HAVE_INTEL_SSE2
-# HAVE_INTEL_SSE3
-# HAVE_INTEL_SSSE3
-# HAVE_INTEL_PCLMUL
-# HAVE_INTEL_SSE4_1
-# HAVE_INTEL_SSE4_2
 #
 # SIMD_COMPILE_FLAGS
 #
@@ -85,26 +80,6 @@
       if(HAVE_INTEL_SSE2)
         set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse2")
       endif()
-      CHECK_C_COMPILER_FLAG(-msse3 HAVE_INTEL_SSE3)
-      if(HAVE_INTEL_SSE3)
-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse3")
-      endif()
-      CHECK_C_COMPILER_FLAG(-mssse3 HAVE_INTEL_SSSE3)
-      if(HAVE_INTEL_SSSE3)
-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mssse3")
-      endif()
-      CHECK_C_COMPILER_FLAG(-mpclmul HAVE_INTEL_PCLMUL)
-      if(HAVE_INTEL_PCLMUL)
-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -mpclmul")
-      endif()
-      CHECK_C_COMPILER_FLAG(-msse4.1 HAVE_INTEL_SSE4_1)
-      if(HAVE_INTEL_SSE4_1)
-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.1")
-      endif()
-      CHECK_C_COMPILER_FLAG(-msse4.2 HAVE_INTEL_SSE4_2)
-      if(HAVE_INTEL_SSE4_2)
-        set(SIMD_COMPILE_FLAGS "${SIMD_COMPILE_FLAGS} -msse4.2")
-      endif()
     endif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
   endif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686|amd64|x86_64|AMD64")
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(powerpc|ppc)64le")
elpers for checking and generating home environments. (define %destination-directory "/tmp/guix-config") (mkdir-p %destination-directory) (define %temporary-home-directory (mkdtemp! "/tmp/guix-home-import.XXXXXX")) (define-syntax-rule (define-home-environment-matcher name pattern) (define (name obj) (match obj (pattern #t) (x (pk 'fail x #f))))) (define (create-temporary-home files-alist) "Create a temporary home directory in '%temporary-home-directory'. FILES-ALIST is an association list of files and the content of the corresponding file." (define (create-file file content) (let ((absolute-path (string-append %temporary-home-directory "/" file))) (unless (file-exists? absolute-path) (mkdir-p (dirname absolute-path))) (call-with-output-file absolute-path (cut display content <>)))) (for-each (match-lambda ((file . content) (create-file file content))) files-alist)) (define (remove-recursively pred sexp) "Like SRFI-1 'remove', but recurse within SEXP." (let loop ((sexp sexp)) (match sexp ((lst ...) (map loop (remove pred lst))) (x x)))) (define (eval-test-with-home-environment files-alist manifest matcher) (create-temporary-home files-alist) (setenv "HOME" %temporary-home-directory) (mkdir-p %temporary-home-directory) (let* ((home-environment (manifest+configuration-files->code manifest %destination-directory)) (result (matcher (remove-recursively blank? home-environment)))) (delete-file-recursively %temporary-home-directory) result)) (define-home-environment-matcher match-home-environment-no-services ('begin ('use-modules ('gnu 'home) ('gnu 'packages) ('gnu 'services)) ('home-environment ('packages ('specifications->packages ('list "guile@2.0.9" "gcc:lib" "glibc@2.19"))) ('services ('list))))) (define-home-environment-matcher match-home-environment-transformations ('begin ('use-modules ('gnu 'home) ('gnu 'packages) ('gnu 'services) ('guix 'transformations)) ('define transform ('options->transformation _)) ('home-environment ('packages ('list (transform ('specification->package "guile@2.0.9")) ('list ('specification->package "gcc") "lib") ('specification->package "glibc@2.19"))) ('services ('list))))) (define-home-environment-matcher match-home-environment-no-services-nor-packages ('begin ('use-modules ('gnu 'home) ('gnu 'packages) ('gnu 'services)) ('home-environment ('packages ('specifications->packages ('list))) ('services ('list))))) (define-home-environment-matcher match-home-environment-bash-service ('begin ('use-modules ('gnu 'home) ('gnu 'packages) ('gnu 'services) ('guix 'gexp) ('gnu 'home 'services 'shells)) ('home-environment ('packages ('specifications->packages ('list))) ('services ('list ('service 'home-bash-service-type ('home-bash-configuration ('aliases ('quote ())) ('bashrc ('list ('local-file "/tmp/guix-config/.bashrc" "bashrc")))))))))) (define-home-environment-matcher match-home-environment-bash-service-with-alias ('begin ('use-modules ('gnu 'home) ('gnu 'packages) ('gnu 'services) ('guix 'gexp) ('gnu 'home 'services 'shells)) ('home-environment ('packages ('specifications->packages ('list))) ('services ('list ('service 'home-bash-service-type ('home-bash-configuration ('aliases ('quote (("grep" . "grep --exclude-from=\"$HOME/.grep-exclude\"") ("ls" . "ls -p")))) ('bashrc ('list ('local-file "/tmp/guix-config/.bashrc" "bashrc")))))))))) (test-assert "manifest->code: No services" (eval-test-with-home-environment '() (make-manifest (list guile-2.0.9 gcc glibc)) match-home-environment-no-services)) (test-assert "manifest->code: No services, package transformations" (eval-test-with-home-environment '() (make-manifest (list (manifest-entry (inherit guile-2.0.9) (properties `((transformations . ((foo . "bar")))))) gcc glibc)) match-home-environment-transformations)) (test-assert "manifest->code: No packages nor services" (eval-test-with-home-environment '() (make-manifest '()) match-home-environment-no-services-nor-packages)) (test-assert "manifest->code: Bash service" (eval-test-with-home-environment '((".bashrc" . "echo 'hello guix'")) (make-manifest '()) match-home-environment-bash-service)) (test-assert "manifest->code: Bash service with aliases" (eval-test-with-home-environment '((".bashrc" . "# Aliases alias ls=\"ls -p\"; alias grep='grep --exclude-from=\"$HOME/.grep-exclude\"'\n")) (make-manifest '()) match-home-environment-bash-service-with-alias)) (test-end "home-import")