diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-16 23:21:13 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-16 23:21:13 +0000 |
commit | 2c7fa189fb2ac1c4ef689398ab13a4465448856a (patch) | |
tree | a20b6c0b65d6516b667ab3709960ae6f3ccfa2ba /pkgs/development/libraries/glibc-2.9 | |
parent | d82c7e0a69d186b3c83736fd5c2aed7b12a3f7dc (diff) |
Making the definition of the cross compiling target an attribute set.
svn path=/nixpkgs/branches/stdenv-updates/; revision=18378
Diffstat (limited to 'pkgs/development/libraries/glibc-2.9')
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/builder.sh | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc-2.9/default.nix | 7 |
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 791be83b98eac..ca89ffdc1608e 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 ff47696e20b53..9f02fa33e0df2 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" |