Making the gcc cross-compiler a bit more flexible.
svn path=/nixpkgs/trunk/; revision=20614
This commit is contained in:
parent
71bf444504
commit
9b1d5353a9
@ -57,24 +57,34 @@ let version = "4.4.3";
|
|||||||
|
|
||||||
javaAwtGtk = langJava && gtk != null;
|
javaAwtGtk = langJava && gtk != null;
|
||||||
|
|
||||||
withCPU = if cross ? cpu then " --with-cpu=${cross.cpu}" else "";
|
/* Cross-gcc settings */
|
||||||
|
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
|
||||||
|
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
|
||||||
|
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] 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 "";
|
||||||
|
|
||||||
crossConfigureFlags =
|
crossConfigureFlags =
|
||||||
"--target=${cross.config}" +
|
"--target=${cross.config}" +
|
||||||
withCPU +
|
withArch +
|
||||||
|
withCpu +
|
||||||
|
withAbi +
|
||||||
(if crossStageStatic then
|
(if crossStageStatic then
|
||||||
" --disable-libssp --disable-nls" +
|
" --disable-libssp --disable-nls" +
|
||||||
" --without-headers" +
|
" --without-headers" +
|
||||||
" --disable-threads " +
|
" --disable-threads " +
|
||||||
" --disable-libmudflap " +
|
" --disable-libmudflap " +
|
||||||
" --disable-libgomp " +
|
" --disable-libgomp " +
|
||||||
" --disable-shared"
|
" --disable-shared" +
|
||||||
|
" --disable-decimal-float" # libdecnumber requires libc
|
||||||
else
|
else
|
||||||
" --with-headers=${libcCross}/include" +
|
" --with-headers=${libcCross}/include" +
|
||||||
" --enable-__cxa_atexit" +
|
" --enable-__cxa_atexit" +
|
||||||
" --enable-long-long" +
|
" --enable-long-long" +
|
||||||
" --enable-threads=posix" +
|
" --enable-threads=posix" +
|
||||||
" --enable-nls"
|
" --enable-nls" +
|
||||||
|
" --disable-decimal-float" # No final libdecnumber (it may work only in 386)
|
||||||
);
|
);
|
||||||
stageNameAddon = if (crossStageStatic) then "-stage-static" else
|
stageNameAddon = if (crossStageStatic) then "-stage-static" else
|
||||||
"-stage-final";
|
"-stage-final";
|
||||||
|
@ -105,7 +105,6 @@ let
|
|||||||
arch = "sparc64";
|
arch = "sparc64";
|
||||||
float = "hard";
|
float = "hard";
|
||||||
withTLS = true;
|
withTLS = true;
|
||||||
cpu = "ultrasparc";
|
|
||||||
libc = "glibc";
|
libc = "glibc";
|
||||||
platform = {
|
platform = {
|
||||||
name = "ultrasparc";
|
name = "ultrasparc";
|
||||||
@ -118,6 +117,7 @@ let
|
|||||||
uboot = null;
|
uboot = null;
|
||||||
};
|
};
|
||||||
openssl.system = "linux64-sparcv9";
|
openssl.system = "linux64-sparcv9";
|
||||||
|
gcc.cpu = "ultrasparc";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
crossUltraSparcLinux = mapTestOnCross crossSystem basic;
|
crossUltraSparcLinux = mapTestOnCross crossSystem basic;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user