1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

glib: Allow cross compilation

tweaked to handle non-glibc along with others
This commit is contained in:
Ben Gamari 2017-10-17 15:46:27 -04:00 committed by Will Dietz
parent 2060f547df
commit c68aa532d6

View file

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