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
This commit is contained in:
Lluís Batlle i Rossell
2009-11-15 05:28:35 +00:00
parent 2aba922d30
commit 9b977f5c60
8 changed files with 168 additions and 47 deletions
@@ -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
'';