glib: Allow cross compilation
tweaked to handle non-glibc along with others
This commit is contained in:
parent
2060f547df
commit
c68aa532d6
|
@ -75,8 +75,13 @@ stdenv.mkDerivation rec {
|
|||
# internal pcre would only add <200kB, but it's relatively common
|
||||
configureFlags = [ "--with-pcre=system" ]
|
||||
++ optional stdenv.isDarwin "--disable-compile-warnings"
|
||||
++ optional (stdenv.isFreeBSD || stdenv.isSunOS) "--with-libiconv=gnu"
|
||||
++ optional stdenv.isSunOS "--disable-dtrace";
|
||||
++ optional (stdenv.hostPlatform.libc != "glibc") "--with-libiconv=gnu"
|
||||
++ optional stdenv.isSunOS "--disable-dtrace"
|
||||
# Can't run this test when cross-compiling
|
||||
++ optionals (stdenv.hostPlatform != stdenv.buildPlatform)
|
||||
[ "glib_cv_stack_grows=no" "glib_cv_uscore=no" ]
|
||||
# GElf only supports elf64 hosts
|
||||
++ optional (!stdenv.hostPlatform.is64bit) "--disable-libelf";
|
||||
|
||||
NIX_CFLAGS_COMPILE = optional stdenv.isDarwin "-lintl"
|
||||
++ optional stdenv.isSunOS "-DBSD_COMP";
|
||||
|
|
Loading…
Reference in New Issue