mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
Adding platform gcc information for raspberrypi, and the gcc support.
Without it, gcc builds for softfloat, and the glibc doesn't have support for softfloat (it ends up requiring some gnu-soft.h file). We'll have to test if this fixes the build of gcc or not, though.
This commit is contained in:
parent
d8b0834973
commit
97d81bde0c
|
@ -87,18 +87,37 @@ let version = "4.6.3";
|
||||||
|
|
||||||
javaAwtGtk = langJava && gtk != null;
|
javaAwtGtk = langJava && gtk != null;
|
||||||
|
|
||||||
/* Cross-gcc settings */
|
/* Platform flags */
|
||||||
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
|
platformFlags = let
|
||||||
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
|
gccArch = stdenv.lib.attrByPath [ "platform" "gcc" "arch" ] null stdenv;
|
||||||
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
|
gccCpu = stdenv.lib.attrByPath [ "platform" "gcc" "cpu" ] null stdenv;
|
||||||
gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null cross;
|
gccAbi = stdenv.lib.attrByPath [ "platform" "gcc" "abi" ] null stdenv;
|
||||||
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
gccFpu = stdenv.lib.attrByPath [ "platform" "gcc" "fpu" ] null stdenv;
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
gccFloat = stdenv.lib.attrByPath [ "platform" "gcc" "float" ] null stdenv;
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
crossMingw = (cross != null && cross.libc == "msvcrt");
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
||||||
|
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
|
||||||
|
in
|
||||||
|
(withArch +
|
||||||
|
withCpu +
|
||||||
|
withAbi +
|
||||||
|
withFpu +
|
||||||
|
withFloat);
|
||||||
|
|
||||||
crossConfigureFlags =
|
/* Cross-gcc settings */
|
||||||
|
crossMingw = (cross != null && cross.libc == "msvcrt");
|
||||||
|
crossConfigureFlags = let
|
||||||
|
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
|
||||||
|
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
|
||||||
|
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
|
||||||
|
gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null cross;
|
||||||
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
|
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
|
||||||
|
in
|
||||||
"--target=${cross.config}" +
|
"--target=${cross.config}" +
|
||||||
withArch +
|
withArch +
|
||||||
withCpu +
|
withCpu +
|
||||||
|
@ -300,6 +319,7 @@ stdenv.mkDerivation ({
|
||||||
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
|
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
|
||||||
${if cross != null then crossConfigureFlags else ""}
|
${if cross != null then crossConfigureFlags else ""}
|
||||||
${if !bootstrap then "--disable-bootstrap" else ""}
|
${if !bootstrap then "--disable-bootstrap" else ""}
|
||||||
|
${if cross == null then platformFlags else ""}
|
||||||
";
|
";
|
||||||
|
|
||||||
targetConfig = if cross != null then cross.config else null;
|
targetConfig = if cross != null then cross.config else null;
|
||||||
|
|
|
@ -222,6 +222,11 @@ rec {
|
||||||
uboot = "sheevaplug";
|
uboot = "sheevaplug";
|
||||||
# Only for uboot = uboot :
|
# Only for uboot = uboot :
|
||||||
ubootConfig = "sheevaplug_config";
|
ubootConfig = "sheevaplug_config";
|
||||||
|
gcc = {
|
||||||
|
arch = "armv6";
|
||||||
|
fpu = "vfp";
|
||||||
|
float = "hard";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
guruplug = sheevaplug // {
|
guruplug = sheevaplug // {
|
||||||
|
|
Loading…
Reference in a new issue