summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2019-11-22 10:49:33 +0100
committerGitHub <noreply@github.com>2019-11-22 10:49:33 +0100
commit1b13a8f2e74780f788201b502eba57a32cefcd19 (patch)
tree17b451fb5f4a0be8dcb2597c10238339633d2f4e /pkgs
parentd940d24ff47960f256024df8e631c4f0d1a9bc33 (diff)
parent72170904646a3867963728c503cdb2857964d0fa (diff)
downloadnixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.tar
nixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.tar.gz
nixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.tar.bz2
nixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.tar.lz
nixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.tar.xz
nixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.tar.zst
nixpkgs-1b13a8f2e74780f788201b502eba57a32cefcd19.zip
Merge pull request #69552 from domenkozar/ghc-dwarf
ghc: compile with DWARF support by default
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/ghc/head.nix27
1 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index 565c545e48c..0e73f81fbab 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -2,11 +2,14 @@
 
 # build-tools
 , bootPkgs
-, autoconf, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx
+, autoconf, autoreconfHook, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx
 , bash
 
 , libiconv ? null, ncurses
 
+, enableDwarf ? !stdenv.targetPlatform.isDarwin &&
+                !stdenv.targetPlatform.isWindows, elfutils # for DWARF support
+
 , useLLVM ? !stdenv.targetPlatform.isx86
 , # LLVM is conceptually a run-time-only depedendency, but for
   # non-x86, we need LLVM to bootstrap later stages, so it becomes a
@@ -27,7 +30,7 @@
 , # Whetherto build terminfo.
   enableTerminfo ? !stdenv.targetPlatform.isWindows
 
-, version ? "8.9.20190924"
+, version ? "8.10.20191119"
 , # What flavour to build. An empty string indicates no
   # specific flavour and falls back to ghc default values.
   ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
@@ -73,7 +76,8 @@ let
   # Splicer will pull out correct variations
   libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
     ++ stdenv.lib.optional (!enableIntegerSimple) gmp
-    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
+    ++ stdenv.lib.optional enableDwarf elfutils;
 
   toolsForTarget = [
     pkgsBuildTarget.targetPackages.stdenv.cc
@@ -89,8 +93,8 @@ stdenv.mkDerivation (rec {
 
   src = fetchgit {
     url = "https://gitlab.haskell.org/ghc/ghc.git/";
-    rev = "795986aaf33e2ffc233836b86a92a77366c91db2";
-    sha256 = "0a111x6c53r07q5qdg6c8mnydqp0wh4mpxmw7ga4x5wlap8i0bji";
+    rev = "0418c38d55c7a47967187dce2db5ea2ab1021b1e";
+    sha256 = "1d8g30ii0w4xh6fh61bxbalsqqyanny99nn3p727fx7favnhgvxi";
   };
 
   enableParallelBuilding = true;
@@ -98,13 +102,6 @@ stdenv.mkDerivation (rec {
   outputs = [ "out" "doc" ];
 
   patches = [
-    (fetchpatch { # https://github.com/haskell/haddock/issues/900
-     url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
-     name = "loadpluginsinmodules.diff";
-     sha256 = "0bvvv0zsfq2581zsir97zfkggc1kkircbbajc2fz3b169ycpbha1";
-     extraPrefix = "utils/haddock/";
-     stripLen = 1;
-   })
   ];
 
   postPatch = "patchShebangs .";
@@ -176,13 +173,17 @@ stdenv.mkDerivation (rec {
     "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
   ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
     "--disable-large-address-space"
+  ] ++ stdenv.lib.optional enableDwarf [
+    "--enable-dwarf-unwind"
+    "--with-libdw-includes=${stdenv.lib.getDev elfutils}/include"
+    "--with-libdw-libraries=${stdenv.lib.getLib elfutils}/lib"
   ];
 
   # Make sure we never relax`$PATH` and hooks support for compatability.
   strictDeps = true;
 
   nativeBuildInputs = [
-    perl autoconf automake m4 python3 sphinx
+    perl autoconf autoreconfHook automake m4 python3 sphinx
     ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
   ];