summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-05-07 09:00:06 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-05-07 09:00:06 +0200
commit0196d8f11cff9790531f7599153a077bb493b9cf (patch)
tree7ef549aa58c987961d33b4c7ade22edb6fb6ec31 /pkgs/development/libraries/qt-5
parent193b899af2052051cb4eacf868fc8169c675d26f (diff)
parenta3f8a25ab30578bc851049ee8d468da09d21dff2 (diff)
downloadnixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.tar
nixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.tar.gz
nixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.tar.bz2
nixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.tar.lz
nixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.tar.xz
nixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.tar.zst
nixpkgs-0196d8f11cff9790531f7599153a077bb493b9cf.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/libraries/qt-5')
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtbase.nix17
-rw-r--r--pkgs/development/libraries/qt-5/modules/qtwebengine.nix19
2 files changed, 29 insertions, 7 deletions
diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix
index 9ae7b274917..bd92d9bc27c 100644
--- a/pkgs/development/libraries/qt-5/modules/qtbase.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix
@@ -249,15 +249,18 @@ stdenv.mkDerivation {
     ++ (
       if (!stdenv.hostPlatform.isx86_64)
       then [ "-no-sse2" ]
-      else lib.optional (compareVersion "5.9.0" >= 0) [ "-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" ];
+        "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" ];
+      }.${stdenv.hostPlatform.platform.gcc.arch or "default"}
     )
     ++ [
-      "-no-sse3"
-      "-no-ssse3"
-      "-no-sse4.1"
-      "-no-sse4.2"
-      "-no-avx"
-      "-no-avx2"
       "-no-mips_dsp"
       "-no-mips_dspr2"
     ]
diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
index fb838283b1b..86897cb3f16 100644
--- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
+++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix
@@ -102,6 +102,25 @@ EOF
       --replace 'libs = [ "sandbox" ]' 'libs = [ "/usr/lib/libsandbox.1.dylib" ]'
     '');
 
+  NIX_CFLAGS_COMPILE =
+  # it fails when compiled with -march=sandybridge https://github.com/NixOS/nixpkgs/pull/59148#discussion_r276696940
+  # TODO: investigate and fix properly
+    lib.optionals (stdenv.hostPlatform.platform.gcc.arch or "" == "sandybridge") [ "-march=westmere" ] ++
+    lib.optionals stdenv.isDarwin [
+      "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10"
+      "-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"
+
+      #
+      # Prevent errors like
+      # /nix/store/xxx-apple-framework-CoreData/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h:51:7:
+      # error: pointer to non-const type 'id' with no explicit ownership
+      #     id** _kvcPropertyAccessors;
+      #
+      # TODO remove when new Apple SDK is in
+      #
+      "-fno-objc-arc"
+    ];
+
   preConfigure = ''
     export NINJAFLAGS=-j$NIX_BUILD_CORES