From 1ac274784ba5b3a2468f3a5def558b9e0c59d49e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 29 Nov 2012 10:58:31 +0100 Subject: [PATCH] gcc 4.7: don't pass `--with-native-system-header-dir' when cross-compiling --- pkgs/development/compilers/gcc/4.7/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/4.7/default.nix b/pkgs/development/compilers/gcc/4.7/default.nix index 5053e105aeb..60ef44f2a90 100644 --- a/pkgs/development/compilers/gcc/4.7/default.nix +++ b/pkgs/development/compilers/gcc/4.7/default.nix @@ -288,7 +288,9 @@ stdenv.mkDerivation ({ ) ) } - ${if (stdenv ? glibc) then " --with-native-system-header-dir=${stdenv.glibc}/include" else ""} + ${if (stdenv ? glibc && cross == null) + then " --with-native-system-header-dir=${stdenv.glibc}/include" + else ""} ${ # Trick that should be taken out once we have a mips64el-linux not loongson2f if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""} ${if langAda then " --enable-libada" else ""}