ghc: Predicate libiconv on not using glibc instead of Darwin

This commit is contained in:
John Ericson 2017-09-18 23:56:47 -04:00
parent 398ac54593
commit e760de8108
6 changed files with 12 additions and 12 deletions

View file

@ -57,7 +57,7 @@ let
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc == "libSystem") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@ -105,7 +105,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.isDarwin) [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"

View file

@ -17,7 +17,7 @@ let
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib"
DYNAMIC_BY_DEFAULT = NO
${stdenv.lib.optionalString stdenv.isDarwin ''
${stdenv.lib.optionalString (stdenv.hostPlatform.libc != "glibc") ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
@ -31,7 +31,7 @@ let
# Splicer will pull out correct variations
libDeps = [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (stdenv.hostPlatform.libc == "libSystem") libiconv;
++ stdenv.lib.optional (stdenv.hostPlatform.libc != "glibc") libiconv;
in

View file

@ -51,7 +51,7 @@ let
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc == "libSystem") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.isDarwin) [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"

View file

@ -56,7 +56,7 @@ let
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc == "libSystem") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.isDarwin) [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"

View file

@ -57,7 +57,7 @@ let
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc == "libSystem") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@ -105,7 +105,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.isDarwin) [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"

View file

@ -57,7 +57,7 @@ let
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc == "libSystem") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@ -105,7 +105,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.isDarwin) [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"