Barf. I have to test the expressions before commiting.

svn path=/nixpkgs/trunk/; revision=20278
This commit is contained in:
Lluís Batlle i Rossell 2010-02-27 20:37:58 +00:00
parent 81b325b33f
commit 4677180b0d
2 changed files with 11 additions and 5 deletions

View File

@ -1,8 +1,14 @@
{stdenv, fetchurl, perl, cross ? null, platform}: {stdenv, fetchurl, perl, cross ? null}:
assert cross == null -> stdenv.isLinux; assert cross == null -> stdenv.isLinux;
let version = "2.6.32.9"; in let
version = "2.6.32.9";
kernelHeadersBaseConfig = if (cross != null) then
stdenv.platform.kernelHeadersBaseConfig
else
cross.platform.kernelHeadersBaseConfig;
in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "linux-headers-${version}"; name = "linux-headers-${version}";
@ -15,7 +21,7 @@ stdenv.mkDerivation {
targetConfig = if (cross != null) then cross.config else null; targetConfig = if (cross != null) then cross.config else null;
platform = platform =
if cross != null then platform.kernelArch else if cross != null then cross.platform.kernelArch else
if stdenv.system == "i686-linux" then "i386" else if stdenv.system == "i686-linux" then "i386" else
if stdenv.system == "x86_64-linux" then "x86_64" else if stdenv.system == "x86_64-linux" then "x86_64" else
if stdenv.system == "powerpc-linux" then "powerpc" else if stdenv.system == "powerpc-linux" then "powerpc" else
@ -33,7 +39,7 @@ stdenv.mkDerivation {
if test -n "$targetConfig"; then if test -n "$targetConfig"; then
export ARCH=$platform export ARCH=$platform
fi fi
make ${platform.kernelHeadersBaseConfig} make ${kernelHeadersBaseConfig}
make mrproper headers_check make mrproper headers_check
''; '';

View File

@ -1967,7 +1967,7 @@ let
enableMultilib = false; enableMultilib = false;
# cross-building for ultrasparc in 4.4.3 will require disabling shared due to a gcc bug. # cross-building for ultrasparc in 4.4.3 will require disabling shared due to a gcc bug.
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41818 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41818
enableShared = if (cross.platform.arch == "sparc64") then true false else; enableShared = if (crossSystem.platform.arch == "sparc64") then false else true;
crossStageStatic = false; crossStageStatic = false;
}; };