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.
This commit is contained in:
parent
affca4a11c
commit
f2f50c42d2
@ -90,10 +90,12 @@ let version = "4.7.2";
|
|||||||
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
|
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
|
||||||
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
|
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
|
||||||
gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] 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 "";
|
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
|
||||||
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
|
||||||
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
|
||||||
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" 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");
|
crossMingw = (cross != null && cross.libc == "msvcrt");
|
||||||
|
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
@ -102,6 +104,7 @@ let version = "4.7.2";
|
|||||||
withCpu +
|
withCpu +
|
||||||
withAbi +
|
withAbi +
|
||||||
withFpu +
|
withFpu +
|
||||||
|
withFloat +
|
||||||
(if (crossMingw && crossStageStatic) then
|
(if (crossMingw && crossStageStatic) then
|
||||||
" --with-headers=${libcCross}/include" +
|
" --with-headers=${libcCross}/include" +
|
||||||
" --with-gcc" +
|
" --with-gcc" +
|
||||||
@ -320,10 +323,12 @@ stdenv.mkDerivation ({
|
|||||||
xgccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null stdenv.cross;
|
xgccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null stdenv.cross;
|
||||||
xgccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null stdenv.cross;
|
xgccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null stdenv.cross;
|
||||||
xgccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] 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 "";
|
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
|
||||||
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
|
||||||
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
|
||||||
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
|
||||||
|
xwithFloat = if xgccFpu != null then " --with-float=${xgccFloat}" else "";
|
||||||
in {
|
in {
|
||||||
AR = "${stdenv.cross.config}-ar";
|
AR = "${stdenv.cross.config}-ar";
|
||||||
LD = "${stdenv.cross.config}-ld";
|
LD = "${stdenv.cross.config}-ld";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user