haskell.compiler.ghc8107: use libffi 3.3

This is the libffi version that GHC 8.10.7 was released with.
libffi >= 3.4 in nixpkgs is no longer getting configured with the
configure flag that enabled GHC to continue working.
See https://gitlab.haskell.org/ghc/ghc/-/issues/20051.

Fixes #324384.

Co-authored-by: sternenseemann <sternenseemann@systemli.org>

authored by doyougnu sternenseemann and committed by sternenseemann 93d765be dcb948f5

+7 -5
+7 -5
pkgs/development/compilers/ghc/8.10.7.nix
··· 9 , libiconv ? null, ncurses 10 11 , # GHC can be built with system libffi or a bundled one. 12 - libffi ? null 13 14 , useLLVM ? !(stdenv.targetPlatform.isx86 15 || stdenv.targetPlatform.isPower ··· 119 120 # Splicer will pull out correct variations 121 libDeps = platform: lib.optional enableTerminfo ncurses 122 - ++ [libffi] 123 ++ lib.optional (!enableIntegerSimple) gmp 124 ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; 125 ··· 334 configureFlags = [ 335 "--datadir=$doc/share/doc/ghc" 336 "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" 337 - ] ++ lib.optionals (libffi != null) [ 338 "--with-system-libffi" 339 - "--with-ffi-includes=${targetPackages.libffi.dev}/include" 340 - "--with-ffi-libraries=${targetPackages.libffi.out}/lib" 341 ] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [ 342 "--with-gmp-includes=${targetPackages.gmp.dev}/include" 343 "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
··· 9 , libiconv ? null, ncurses 10 11 , # GHC can be built with system libffi or a bundled one. 12 + # we explicitly use libffi-3.3 here because 3.4 removes a flag that causes 13 + # problems for ghc-8.10.7's RTS. See #324384. 14 + libffi_3_3 ? null 15 16 , useLLVM ? !(stdenv.targetPlatform.isx86 17 || stdenv.targetPlatform.isPower ··· 121 122 # Splicer will pull out correct variations 123 libDeps = platform: lib.optional enableTerminfo ncurses 124 + ++ [libffi_3_3] 125 ++ lib.optional (!enableIntegerSimple) gmp 126 ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; 127 ··· 336 configureFlags = [ 337 "--datadir=$doc/share/doc/ghc" 338 "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" 339 + ] ++ lib.optionals (libffi_3_3 != null) [ 340 "--with-system-libffi" 341 + "--with-ffi-includes=${targetPackages.libffi_3_3.dev}/include" 342 + "--with-ffi-libraries=${targetPackages.libffi_3_3.out}/lib" 343 ] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [ 344 "--with-gmp-includes=${targetPackages.gmp.dev}/include" 345 "--with-gmp-libraries=${targetPackages.gmp.out}/lib"