diff --git a/pkgs/development/compilers/gcc-4.5/default.nix b/pkgs/development/compilers/gcc-4.5/default.nix index 77e3cbfa3ed..19efa57af8e 100644 --- a/pkgs/development/compilers/gcc-4.5/default.nix +++ b/pkgs/development/compilers/gcc-4.5/default.nix @@ -180,7 +180,7 @@ stdenv.mkDerivation ({ # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let - libc = if cross != null then libcCross else stdenv.gcc.libc; + libc = if (cross != null && libcCross != null) then libcCross else stdenv.gcc.libc; in '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h