First movement to get the raspberrypi stdenv building.

This commit is contained in:
root
2012-12-26 21:59:54 +00:00
committed by Lluís Batlle i Rossell
parent 1af2ada7d4
commit 1b29d29c76
7 changed files with 131 additions and 8 deletions
@@ -8,7 +8,7 @@ cross :
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
, mig ? null, fetchgit ? null
, profilingLibraries ? false, meta
, preConfigure ? "", ... }@args :
, preConfigure ? "", recentGcc ? true, ... }@args :
let
# For GNU/Hurd, see below.
@@ -120,11 +120,21 @@ stdenv.mkDerivation ({
&& cross.platform.kernelMajor == "2.6") [
"--enable-kernel=2.6.0"
"--with-__thread"
] ++ stdenv.lib.optionals stdenv.isArm [
] ++ stdenv.lib.optionals (cross == null &&
(stdenv.system == "armv5tel-linux") ||
(!recentGcc && stdenv.platform.name == "raspberrypi")) [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
] ++ stdenv.lib.optionals (cross == null && recentGcc && stdenv.platform.name == "raspberrypi") [
"--host=arm-linux-gnueabihf"
"--build=arm-linux-gnueabihf"
"--with-fp"
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
@@ -192,6 +202,10 @@ stdenv.mkDerivation ({
configureScript="`pwd`/../$sourceRoot/configure"
${preConfigure}
'' + stdenv.lib.optionalString (cross == null
&& recentGcc
&& stdenv.platform.name == "raspberrypi") ''
configureFlagsArray=("CFLAGS=-march=armv6 -mfpu=vfp -mhard-float")
'';
meta = {
@@ -5,6 +5,7 @@
, profilingLibraries ? false
, gccCross ? null
, debugSymbols ? false
, recentGcc ? true
}:
assert stdenv.gcc.gcc != null;
@@ -19,7 +20,7 @@ in
+ stdenv.lib.optionalString debugSymbols "-debug";
inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries
gccCross;
gccCross recentGcc;
builder = ./builder.sh;