gcc47: Adding gcc mode, cross-building.
It's useful to build toolchains for armv7-m, to set thumb mode. It doesn't support arm mode. chaoflow needed it.
This commit is contained in:
parent
60de7967da
commit
fde74242bf
@ -89,9 +89,11 @@ let version = "4.7.2";
|
|||||||
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
|
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
|
||||||
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;
|
||||||
|
gccMode = stdenv.lib.attrByPath [ "gcc" "mode" ] 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 "";
|
||||||
|
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
|
||||||
crossMingw = (cross != null && cross.libc == "msvcrt");
|
crossMingw = (cross != null && cross.libc == "msvcrt");
|
||||||
|
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
@ -99,6 +101,7 @@ let version = "4.7.2";
|
|||||||
withArch +
|
withArch +
|
||||||
withCpu +
|
withCpu +
|
||||||
withAbi +
|
withAbi +
|
||||||
|
withMode +
|
||||||
(if (crossMingw && crossStageStatic) then
|
(if (crossMingw && crossStageStatic) then
|
||||||
" --with-headers=${libcCross}/include" +
|
" --with-headers=${libcCross}/include" +
|
||||||
" --with-gcc" +
|
" --with-gcc" +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user