Add armv7l support.

svn path=/nixpkgs/trunk/; revision=33798
This commit is contained in:
Nicolas Pierron 2012-04-15 23:41:25 +00:00
parent 6a9ac1f016
commit 82b308bf11
31 changed files with 46 additions and 33 deletions

View file

@ -2,7 +2,7 @@
, enableX11 ? true}:
let
nativeCode = if stdenv.system == "armv5tel-linux" then false else true;
nativeCode = if stdenv.isArm then false else true;
in
stdenv.mkDerivation (rec {

View file

@ -76,7 +76,7 @@ stdenv.mkDerivation {
if !nativeLibc then
(if stdenv.system == "i686-linux" then "ld-linux.so.2" else
if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else
if stdenv.system == "armv5tel-linux" then "ld-linux.so.3" else
if stdenv.isArm then "ld-linux.so.3" else
if stdenv.system == "powerpc-linux" then "ld.so.1" else
if stdenv.system == "mips64el-linux" then "ld.so.1" else
abort "don't know the name of the dynamic linker for this platform")

View file

@ -84,7 +84,7 @@ stdenv.mkDerivation {
if !nativeLibc then
(if stdenv.system == "i686-linux" then "ld-linux.so.2" else
if stdenv.system == "x86_64-linux" then "ld-linux-x86-64.so.2" else
if stdenv.system == "armv5tel-linux" then "ld-linux.so.3" else
if stdenv.isArm then "ld-linux.so.3" else
if stdenv.system == "powerpc-linux" then "ld.so.1" else
if stdenv.system == "mips64el-linux" then "ld.so.1" else
abort "don't know the name of the dynamic linker for this platform")

View file

@ -1,8 +1,8 @@
{ stdenv, fetchurl, ncurses, x11 }:
let
useX11 = stdenv.system != "armv5tel-linux";
useNativeCompilers = stdenv.system != "armv5tel-linux";
useX11 = !stdenv.isArm;
useNativeCompilers = !stdenv.isArm;
inherit (stdenv.lib) optionals optionalString;
in

View file

@ -14,9 +14,9 @@ stdenv.mkDerivation (rec {
prefixKey = "-prefix ";
configureFlags = ["-no-tk"];
buildFlags = "world" +
(if (stdenv.system != "armv5tel-linux") then "bootstrap world.opt" else "");
(if !stdenv.isArm then "bootstrap world.opt" else "");
buildInputs = [ncurses];
installTargets = "install" + (if (stdenv.system != "armv5tel-linux") then "installopt" else "");
installTargets = "install" + (if !stdenv.isArm then "installopt" else "");
patchPhase = ''
CAT=$(type -tp cat)
sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang

View file

@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
''
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") ''
${stdenv.lib.optionalString stdenv.isArm ''
configureFlagsArray=(-Dldflags="-lm -lrt")
''}
'';

View file

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
''
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") ''
${stdenv.lib.optionalString stdenv.isArm ''
configureFlagsArray=(-Dldflags="-lm -lrt")
''}
'';

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation (rec {
"-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1";
# The asm for armel is written with the 'asm' keyword.
CFLAGS = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "-std=gnu99";
CFLAGS = stdenv.lib.optionalString stdenv.isArm "-std=gnu99";
meta = {
description = "A font rendering engine";

View file

@ -105,7 +105,7 @@ stdenv.mkDerivation ({
(if cross.float == "soft" then "--without-fp" else "--with-fp")
"--enable-kernel=2.6.0"
"--with-__thread"
] ++ stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [
] ++ stdenv.lib.optionals stdenv.isArm [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"

View file

@ -105,7 +105,7 @@ stdenv.mkDerivation ({
(if cross.float == "soft" then "--without-fp" else "--with-fp")
"--enable-kernel=2.6.0"
"--with-__thread"
] ++ stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [
] ++ stdenv.lib.optionals stdenv.isArm [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"

View file

@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
"--enable-kernel=2.6.0"
"--without-fp"
"--with-__thread"
] ++ (if (stdenv.system == "armv5tel-linux") then [
] ++ (if stdenv.isArm then [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"

View file

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
"--disable-sanity-checks"
"--enable-hacker-mode"
(if profilingLibraries then "--enable-profile" else "--disable-profile")
] ++ (if (stdenv.system == "armv5tel-linux") then [
] ++ (if stdenv.isArm then [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"

View file

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
"--enable-add-ons"
"--without-headers"
"--disable-profile"
] ++ (if (stdenv.system == "armv5tel-linux") then [
] ++ (if stdenv.isArm then [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"

View file

@ -1,7 +1,7 @@
{stdenv, fetchurl}:
# I could not build it in armv5tel-linux or the fuloon2f
assert stdenv.system != "armv5tel-linux";
assert !stdenv.isArm;
assert stdenv.system != "mips64el-linux";
stdenv.mkDerivation {

View file

@ -3,7 +3,7 @@ let lists = import ./lists.nix; in
rec {
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
linux = ["i686-linux" "x86_64-linux" "powerpc-linux" "armv5tel-linux"
"mips64el-linux"];
"armv7l-linux" "mips64el-linux"];
darwin = ["i686-darwin" "powerpc-darwin" "x86_64-darwin"];
freebsd = ["i686-freebsd" "x86_64-freebsd" "powerpc-freebsd"];
openbsd = ["i686-openbsd" "x86_64-openbsd"];

View file

@ -30,6 +30,7 @@ rec {
setTypes "cpu-type" {
arm = { bits = 32; significantByte = littleEndian; };
armv5tel = { bits = 32; significantByte = littleEndian; };
armv7l = { bits = 32; significantByte = littleEndian; };
i686 = { bits = 32; significantByte = littleEndian; };
powerpc = { bits = 32; significantByte = bigEndian; };
x86_64 = { bits = 64; significantByte = littleEndian; };

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
# We get a warning in armv5tel-linux and the fuloong2f,
# so we disable -Werror in it
patchPhase = if (stdenv.system == "armv5tel-linux" ||
patchPhase = if (stdenv.isArm ||
stdenv.system == "mips64el-linux")
then ''
sed -i s/-Werror// src/Makefile.am

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation {
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
if stdenv.isArm then "arm" else
abort "don't know what the kernel include directory is called for this platform";
buildInputs = [perl];

View file

@ -19,7 +19,7 @@ stdenv.mkDerivation {
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
if stdenv.isArm then "arm" else
if stdenv.system == "mips64el-linux" then "mips" else
abort "don't know what the kernel include directory is called for this platform";

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation {
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
if stdenv.isArm then "arm" else
if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else
abort "don't know what the kernel include directory is called for this platform";

View file

@ -25,7 +25,7 @@ stdenv.mkDerivation {
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
if stdenv.isArm then "arm" else
if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else
abort "don't know what the kernel include directory is called for this platform";

View file

@ -46,7 +46,7 @@
}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"
|| stdenv.system == "armv5tel-linux" || stdenv.system == "mips64el-linux";
|| stdenv.isArm || stdenv.system == "mips64el-linux";
assert stdenv.platform.name == "sheevaplug" -> stdenv.platform.uboot != null;
@ -101,7 +101,7 @@ stdenv.mkDerivation {
if userModeLinux then "um" else
if stdenv.system == "i686-linux" then "i386" else
if stdenv.system == "x86_64-linux" then "x86_64" else
if stdenv.system == "armv5tel-linux" then "arm" else
if stdenv.isArm then "arm" else
if stdenv.system == "mips64el-linux" then "mips" else
abort "Platform ${stdenv.system} is not supported.";

View file

@ -11,11 +11,11 @@ stdenv.mkDerivation rec {
buildNativeInputs = [ flex ];
buildInputs = [ cracklib ]
++ stdenv.lib.optional
(stdenv.system != "armv5tel-linux" && stdenv.system != "mips64el-linux")
(stdenv.isArm && stdenv.system != "mips64el-linux")
libxcrypt;
crossAttrs = {
# Skip libxcrypt cross-building, as it fails for mips and armv5tel
# Skip libxcrypt cross-building, as it fails for mips and arm
propagatedBuildInputs = [ flex.hostDrv cracklib.hostDrv ];
preConfigure = preConfigure + ''
ar x ${flex.hostDrv}/lib/libfl.a

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation {
sha256 = "067xnyd3q8ik73glxwyx1lydk4bgl78lzq44mnqqp4jrpnpd04ml";
};
buildInputs = [ pam ] ++ stdenv.lib.optional (stdenv.system != "armv5tel-linux") libxcrypt;
buildInputs = [ pam ] ++ stdenv.lib.optional (!stdenv.isArm) libxcrypt;
meta = {
homepage = ftp://ftp.suse.com/pub/people/kukuk/pam/pam_unix2;

View file

@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
url = https://bugs.archlinux.org/task/25356?getfile=7281;
sha256 = "01xib1pfdbwacgx8dqxgrf67a0mwkpm4kxy9f9v3df93v0m4pmbm";
})] ++
stdenv.lib.optional (stdenv.system == "armv5tel-linux") ./pre-accept4-kernel.patch;
stdenv.lib.optional stdenv.isArm ./pre-accept4-kernel.patch;
meta = {
homepage = http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html;

View file

@ -55,6 +55,7 @@ rec {
if stdenvType == "i686-linux" then stdenvLinux else
if stdenvType == "x86_64-linux" then stdenvLinux else
if stdenvType == "armv5tel-linux" then stdenvLinux else
if stdenvType == "armv7l-linux" then stdenvLinux else
if stdenvType == "mips64el-linux" then stdenvLinux else
if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
if stdenvType == "i686-mingw" then stdenvMinGW else

View file

@ -93,6 +93,7 @@ let
|| result.system == "x86_64-linux"
|| result.system == "powerpc-linux"
|| result.system == "armv5tel-linux"
|| result.system == "armv7l-linux"
|| result.system == "mips64el-linux";
isGNU = result.system == "i686-gnu"; # GNU/Hurd
isSunOS = result.system == "i686-solaris"
@ -120,7 +121,8 @@ let
|| result.system == "x86_64-darwin";
isMips = result.system == "mips-linux"
|| result.system == "mips64el-linux";
isArm = result.system == "armv5tel-linux";
isArm = result.system == "armv5tel-linux"
|| result.system == "armv7l-linux";
# Utility function: allow stdenv to be easily regenerated with
# a different setup script. (See all-packages.nix for an

View file

@ -0,0 +1,3 @@
# rely on ARM backward compatibility to build armv7l binaries with the
# bootstrap tools of armv5tel.
import ../armv5tel

View file

@ -16,6 +16,7 @@ rec {
else if system == "x86_64-linux" then import ./bootstrap/x86_64
else if system == "powerpc-linux" then import ./bootstrap/powerpc
else if system == "armv5tel-linux" then import ./bootstrap/armv5tel
else if system == "armv7l-linux" then import ./bootstrap/armv5tel
else if system == "mips64el-linux" then import ./bootstrap/loongson2f
else abort "unsupported platform for the pure Linux stdenv";

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (rec {
name = "gnutar-1.26";
src = fetchurl {
@ -32,4 +32,9 @@ stdenv.mkDerivation rec {
maintainers = [ stdenv.lib.maintainers.ludo ];
platforms = stdenv.lib.platforms.all;
};
}
}
# May have some issues with root compilation because the bootstrap tool
# cannot be used as a login shell for now.
// stdenv.lib.optionalAttrs (stdenv.system == "armv7l-linux") {
FORCE_UNSAFE_CONFIGURE = 1;
})

View file

@ -1883,7 +1883,7 @@ let
gettext which noSysDirs;
# bootstrapping a profiled compiler does not work in the sheevaplug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true;
profiledCompiler = if stdenv.isArm then false else true;
# When building `gcc.hostDrv' (a "Canadian cross", with host == target
# and host != build), `cross' must be null but the cross-libc must still
@ -1912,7 +1912,7 @@ let
# bootstrapping a profiled compiler does not work in the sheevaplug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true;
profiledCompiler = if stdenv.isArm then false else true;
# When building `gcc.hostDrv' (a "Canadian cross", with host == target
# and host != build), `cross' must be null but the cross-libc must still