From 3eb9903b16353bde60b76248e48fe9bfe833f868 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Sat, 31 Dec 2005 14:35:49 +0000 Subject: [PATCH] Add kernel headers for MIPS, uClibc for MIPS, binutils for MIPS, gcc for MIPS, all in a generic way. Adding new platforms to cross compile applications for with uClibc becomes pretty trivial this way (unless you want C++ support, see 'maintainers/docs/cross.txt' for an explanation why this is so tough to build with Nix.) So, Nix starts with Linux/MIPS support in the New Year :) svn path=/nixpkgs/trunk/; revision=4467 --- pkgs/system/all-packages-generic.nix | 50 ++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 644dd428a82..6928a988c4a 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -489,20 +489,40 @@ rec { inherit stdenv; }; + gcc40mips = (import ../build-support/gcc-cross-wrapper) { + nativeTools = false; + nativeGlibc = false; + cross = "mips-linux"; + gcc = (import ../development/compilers/gcc-4.0-cross) { + inherit fetchurl stdenv noSysDirs; + langF77 = false; + langCC = false; + binutilsCross = binutilsMips; + kernelHeadersCross = kernelHeadersMips; + cross = "mips-linux"; + }; + inherit (stdenv.gcc) glibc; + binutils = binutilsMips; + inherit stdenv; + }; + gcc40arm = (import ../build-support/gcc-cross-wrapper) { nativeTools = false; nativeGlibc = false; cross = "arm-linux"; - gcc = (import ../development/compilers/gcc-4.0-arm) { - inherit fetchurl stdenv noSysDirs binutilsArm kernelHeadersArm; + gcc = (import ../development/compilers/gcc-4.0-cross) { + inherit fetchurl stdenv noSysDirs; langF77 = false; langCC = false; + binutilsCross = binutilsArm; + kernelHeadersCross = kernelHeadersArm; + cross = "arm-linux"; }; - #inherit (stdenv.gcc) binutils glibc; inherit (stdenv.gcc) glibc; binutils = binutilsArm; inherit stdenv; }; + gcc40 = (import ../build-support/gcc-wrapper) { nativeTools = false; nativeGlibc = false; @@ -1424,8 +1444,20 @@ rec { ### OS-SPECIFIC - uclibc = (import ../development/uclibc) { - inherit fetchurl stdenv gcc40arm kernelHeadersArm binutilsArm; + uclibcArm = (import ../development/uclibc) { + inherit fetchurl stdenv; + kernelHeadersCross = kernelHeadersArm; + binutilsCross = binutilsArm; + gccCross = gcc40arm; + cross = "arm-linux"; + }; + + uclibcMips = (import ../development/uclibc) { + inherit fetchurl stdenv; + kernelHeadersCross = kernelHeadersMips; + binutilsCross = binutilsMips; + gccCross = gcc40mips; + cross = "mips-linux"; }; dietlibc = (import ../os-specific/linux/dietlibc) { @@ -1461,8 +1493,14 @@ rec { inherit fetchurl stdenv; }; - kernelHeadersArm = (import ../os-specific/linux/kernel-headers-arm) { + kernelHeadersArm = (import ../os-specific/linux/kernel-headers-cross) { inherit fetchurl stdenv; + cross = "arm-linux"; + }; + + kernelHeadersMips = (import ../os-specific/linux/kernel-headers-cross) { + inherit fetchurl stdenv; + cross = "mips-linux"; }; kernel = (import ../os-specific/linux/kernel) {