From 8c17cc993b8b3d374944f7c6f04663e2047b6128 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Mon, 22 Nov 2021 02:49:30 +0000 Subject: [PATCH] ghcHEAD: fix mingw build --- pkgs/development/compilers/ghc/head.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index cb56087fe1b2..1010d460b030 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -38,9 +38,6 @@ # platform). Static libs are always built. enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt -, # Whether to build terminfo. - enableTerminfo ? !stdenv.targetPlatform.isWindows - , version ? "9.3.20211111" , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. @@ -116,11 +113,17 @@ let GhcRtsHcOpts += -fPIC '' + lib.optionalString targetPlatform.useAndroidPrebuilt '' EXTRA_CC_OPTS += -std=gnu99 + '' + # While split sections are now enabled by default in ghc 8.8 for windows, + # they seem to lead to `too many sections` errors when building base for + # profiling. + + lib.optionalString targetPlatform.isWindows '' + SplitSections = NO ''; # Splicer will pull out correct variations - libDeps = platform: lib.optional enableTerminfo ncurses - ++ [libffi] + libDeps = platform: + [libffi ncurses] ++ lib.optional (!enableNativeBignum) gmp ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv ++ lib.optional enableDwarf elfutils;