summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/glibc-2.9/builder.sh10
-rw-r--r--pkgs/development/libraries/glibc-2.9/default.nix7
2 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/development/libraries/glibc-2.9/builder.sh b/pkgs/development/libraries/glibc-2.9/builder.sh
index 791be83b98e..ca89ffdc160 100644
--- a/pkgs/development/libraries/glibc-2.9/builder.sh
+++ b/pkgs/development/libraries/glibc-2.9/builder.sh
@@ -29,7 +29,7 @@ preConfigure() {
 
     tar xvjf "$srcPorts"
     
-    if test -n "$cross"; then
+    if test -n "$crossConfig"; then
         sed -i s/-lgcc_eh//g Makeconfig
     fi
 
@@ -37,16 +37,16 @@ preConfigure() {
     cd build
     
     configureScript=../configure
-    if test -n "$cross"; then
+    if test -n "$crossConfig"; then
         cat > config.cache << "EOF"
 libc_cv_forced_unwind=yes
 libc_cv_c_cleanup=yes
 libc_cv_gnu89_inline=yes
 EOF
         export BUILD_CC=gcc
-        export CC="${cross}-gcc"
-        export AR="${cross}-ar"
-        export RANLIB="${cross}-ranlib"
+        export CC="${crossConfig}-gcc"
+        export AR="${crossConfig}-ar"
+        export RANLIB="${crossConfig}-ranlib"
         configureFlags="${configureFlags} --cache-file=config.cache"
 
         # The host stripp will destroy everything in the target binaries otherwise
diff --git a/pkgs/development/libraries/glibc-2.9/default.nix b/pkgs/development/libraries/glibc-2.9/default.nix
index ff47696e20b..9f02fa33e0d 100644
--- a/pkgs/development/libraries/glibc-2.9/default.nix
+++ b/pkgs/development/libraries/glibc-2.9/default.nix
@@ -8,7 +8,7 @@
 
 stdenv.mkDerivation rec {
   name = "glibc-2.9" +
-    stdenv.lib.optionalString (cross != null) "-${cross}";
+    stdenv.lib.optionalString (cross != null) "-${cross.config}";
 
   builder = ./builder.sh;
 
@@ -22,7 +22,8 @@ stdenv.mkDerivation rec {
     sha256 = "0r2sn527wxqifi63di7ns9wbjh1cainxn978w178khhy7yw9fk42";
   };
 
-  inherit kernelHeaders installLocales cross;
+  inherit kernelHeaders installLocales;
+  crossConfig = if (cross != null) then cross.config else null;
 
   inherit (stdenv) is64bit;
 
@@ -67,7 +68,7 @@ stdenv.mkDerivation rec {
     "--with-headers=${kernelHeaders}/include"
     (if profilingLibraries then "--enable-profile" else "--disable-profile")
   ] ++ stdenv.lib.optionals (cross != null) [
-    "--host=${cross}"
+    "--host=${cross.config}"
     "--build=${stdenv.system}"
     "--with-tls"
     "--enable-kernel=2.6.0"