ghcHEAD: fix mingw build

This commit is contained in:
Alexandre Esteves 2021-11-22 02:49:30 +00:00
parent fc2a98b118
commit 8c17cc993b

View file

@ -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;