Merge pull request #43711 from angerman/feature/ghc-gmp
Feature/ghc gmp
This commit is contained in:
commit
406914934d
@ -29,6 +29,8 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
@ -43,8 +45,7 @@ let
|
|||||||
include mk/flavours/\$(BuildFlavour).mk
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
endif
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||||
INTEGER_LIBRARY = integer-simple
|
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
Stage1Only = YES
|
Stage1Only = YES
|
||||||
HADDOCK_DOCS = NO
|
HADDOCK_DOCS = NO
|
||||||
@ -127,7 +128,7 @@ stdenv.mkDerivation rec {
|
|||||||
"--datadir=$doc/share/doc/ghc"
|
"--datadir=$doc/share/doc/ghc"
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||||
|
@ -34,6 +34,8 @@
|
|||||||
deterministicProfiling ? false
|
deterministicProfiling ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
@ -48,8 +50,7 @@ let
|
|||||||
include mk/flavours/\$(BuildFlavour).mk
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
endif
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||||
INTEGER_LIBRARY = integer-simple
|
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||||
CrossCompilePrefix = ${targetPrefix}
|
CrossCompilePrefix = ${targetPrefix}
|
||||||
@ -160,8 +161,8 @@ stdenv.mkDerivation rec {
|
|||||||
"--datadir=$doc/share/doc/ghc"
|
"--datadir=$doc/share/doc/ghc"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform) [
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
@ -46,8 +48,7 @@ let
|
|||||||
include mk/flavours/\$(BuildFlavour).mk
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
endif
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||||
INTEGER_LIBRARY = integer-simple
|
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||||
CrossCompilePrefix = ${targetPrefix}
|
CrossCompilePrefix = ${targetPrefix}
|
||||||
@ -149,8 +150,8 @@ stdenv.mkDerivation (rec {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--datadir=$doc/share/doc/ghc"
|
"--datadir=$doc/share/doc/ghc"
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert !enableIntegerSimple -> gmp != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
@ -46,8 +48,7 @@ let
|
|||||||
include mk/flavours/\$(BuildFlavour).mk
|
include mk/flavours/\$(BuildFlavour).mk
|
||||||
endif
|
endif
|
||||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||||
'' + stdenv.lib.optionalString enableIntegerSimple ''
|
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||||
INTEGER_LIBRARY = integer-simple
|
|
||||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||||
CrossCompilePrefix = ${targetPrefix}
|
CrossCompilePrefix = ${targetPrefix}
|
||||||
@ -141,8 +142,8 @@ stdenv.mkDerivation (rec {
|
|||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--datadir=$doc/share/doc/ghc"
|
"--datadir=$doc/share/doc/ghc"
|
||||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||||
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
|
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||||
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user