about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qt-5
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2020-08-05 02:32:41 +0000
committerAlyssa Ross <hi@alyssa.is>2020-11-27 13:28:22 +0000
commitbc030c028322c3797c351832ff2e41348351a223 (patch)
tree1338ec7ecc4c5d9941b419b1b83fe164e261f1b9 /nixpkgs/pkgs/development/libraries/qt-5
parent56a4b2b477a63be9bb1fd016dc9ccfc2bbebf600 (diff)
downloadnixlib-bc030c028322c3797c351832ff2e41348351a223.tar
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.gz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.bz2
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.lz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.xz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.zst
nixlib-bc030c028322c3797c351832ff2e41348351a223.zip
gcc.arch: refactor, move tables under lib/
(cherry picked from commit cf7b63df5b9efdef4e8e1b3261d7040199f7e671)
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-5')
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix33
1 files changed, 12 insertions, 21 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 33054dd403f9..5eaca56684fa 100644
--- a/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/nixpkgs/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -255,27 +255,18 @@ stdenv.mkDerivation {
       "-no-warnings-are-errors"
     ]
     ++ (
-      if (!stdenv.hostPlatform.isx86_64)
-      then [ "-no-sse2" ]
-      else lib.optionals (compareVersion "5.9.0" >= 0) {
-        default        = [ "-sse2" "-no-sse3" "-no-ssse3" "-no-sse4.1" "-no-sse4.2" "-no-avx" "-no-avx2" ];
-        # Intel
-        westmere       = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2" "-no-avx" "-no-avx2" ];
-        sandybridge    = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        ivybridge      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        haswell        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        broadwell      = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        skylake        = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        skylake-avx512 = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        # AMD
-        btver1         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2" "-no-avx" "-no-avx2" ];
-        btver2         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        bdver1         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        bdver2         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        bdver3         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx" "-no-avx2" ];
-        bdver4         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-        znver1         = [ "-sse2"    "-sse3"    "-ssse3"    "-sse4.1"    "-sse4.2"    "-avx"    "-avx2" ];
-      }.${stdenv.hostPlatform.platform.gcc.arch or "default"}
+      if (!stdenv.hostPlatform.isx86_64) then [
+        "-no-sse2"
+      ] else if (compareVersion "5.9.0" >= 0) then [
+        "-sse2"
+        "${if stdenv.hostPlatform.sse3Support   then "" else "-no"}-sse3"
+        "${if stdenv.hostPlatform.ssse3Support  then "" else "-no"}-ssse3"
+        "${if stdenv.hostPlatform.sse4_1Support then "" else "-no"}-sse4.1"
+        "${if stdenv.hostPlatform.sse4_2Support then "" else "-no"}-sse4.2"
+        "${if stdenv.hostPlatform.avxSupport    then "" else "-no"}-avx"
+        "${if stdenv.hostPlatform.avx2Support   then "" else "-no"}-avx2"
+      ] else [
+      ]
     )
     ++ [
       "-no-mips_dsp"