diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2012-12-28 21:12:57 +0100 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2012-12-28 21:12:57 +0100 |
commit | f2f50c42d2c705dc59465c070f5259a4ad00cf4c (patch) | |
tree | 470c0244e5d0fe4b5380fe8f94bb47112c56f3c8 /pkgs/development/compilers/gcc | |
parent | affca4a11cd0b79682398941eec6196df56818e8 (diff) | |
download | nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.tar nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.tar.gz nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.tar.bz2 nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.tar.lz nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.tar.xz nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.tar.zst nixpkgs-f2f50c42d2c705dc59465c070f5259a4ad00cf4c.zip |
gcc47: adding --with-float option to gcc builder
Meant for cross-building. I need that for the raspberrypi bootstrap-tools. Before this, its bootstrap-tools gcc built for softfloat by default.
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.7/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gcc/4.7/default.nix b/pkgs/development/compilers/gcc/4.7/default.nix index 028a1680cb6..f89ee067143 100644 --- a/pkgs/development/compilers/gcc/4.7/default.nix +++ b/pkgs/development/compilers/gcc/4.7/default.nix @@ -90,10 +90,12 @@ let version = "4.7.2"; gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross; gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross; gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null cross; + gccFloat = stdenv.lib.attrByPath [ "gcc" "float" ] 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 ""; + withFloat = if gccFpu != null then " --with-float=${gccFloat}" else ""; crossMingw = (cross != null && cross.libc == "msvcrt"); crossConfigureFlags = @@ -102,6 +104,7 @@ let version = "4.7.2"; withCpu + withAbi + withFpu + + withFloat + (if (crossMingw && crossStageStatic) then " --with-headers=${libcCross}/include" + " --with-gcc" + @@ -320,10 +323,12 @@ stdenv.mkDerivation ({ xgccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null stdenv.cross; xgccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null stdenv.cross; xgccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null stdenv.cross; + xgccFloat = stdenv.lib.attrByPath [ "gcc" "float" ] null stdenv.cross; xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; + xwithFloat = if xgccFpu != null then " --with-float=${xgccFloat}" else ""; in { AR = "${stdenv.cross.config}-ar"; LD = "${stdenv.cross.config}-ld"; |