diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-15 05:28:35 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-15 05:28:35 +0000 |
commit | 9b977f5c601fff3ba9095053c28d5cab72caf80f (patch) | |
tree | a978f5d8d2c9868f11146810095b0db9563e3fbb /pkgs/os-specific/linux/kernel-headers | |
parent | 2aba922d30143044728eae06f42e0bfb90d5b25a (diff) | |
download | nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.tar nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.tar.gz nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.tar.bz2 nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.tar.lz nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.tar.xz nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.tar.zst nixlib-9b977f5c601fff3ba9095053c28d5cab72caf80f.zip |
Fixing many things related to the cross compilation in stdenvCross.
It still does not work, but I think I already get glibc cross compiled. Next: gcc and g++, and set some setup script hooks on stdenvCross. It took quite enough hours for this commit. svn path=/nixpkgs/branches/stdenv-updates/; revision=18351
Diffstat (limited to 'pkgs/os-specific/linux/kernel-headers')
-rw-r--r-- | pkgs/os-specific/linux/kernel-headers/2.6.28.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix b/pkgs/os-specific/linux/kernel-headers/2.6.28.nix index 4591fee1497c..9a2e84cf2a31 100644 --- a/pkgs/os-specific/linux/kernel-headers/2.6.28.nix +++ b/pkgs/os-specific/linux/kernel-headers/2.6.28.nix @@ -2,7 +2,9 @@ assert stdenv.isLinux; -let version = "2.6.28.5"; in +let + version = "2.6.28.5"; +in stdenv.mkDerivation { name = "linux-headers-${version}"; @@ -12,14 +14,17 @@ stdenv.mkDerivation { sha256 = "0hifjh75sinifr5138v22zwbpqln6lhn65k8b57a1dyzlqca7cl9"; }; + inherit cross; platform = if cross == "armv5tel-unknown-linux-gnueabi" then "arm" else + assert(cross == null); if stdenv.system == "i686-linux" then "i386" else if stdenv.system == "x86_64-linux" then "x86_64" else if stdenv.system == "powerpc-linux" then "powerpc" else if stdenv.system == "armv5tel-linux" then "arm" else - abort "don't know what the kernel include directory is called for this platform"; + abort "don't know what the kernel include directory is called for this + platform"; buildInputs = [perl]; @@ -31,6 +36,9 @@ stdenv.mkDerivation { ''; buildPhase = '' + if test -n "$cross"; then + export ARCH=$platform + fi make mrproper headers_check ''; |