diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix index 358e5212407..85a3aee4c89 100644 --- a/pkgs/development/compilers/gcc-4.4/default.nix +++ b/pkgs/development/compilers/gcc-4.4/default.nix @@ -57,24 +57,34 @@ let version = "4.4.3"; 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 = "--target=${cross.config}" + - withCPU + + withArch + + withCpu + + withAbi + (if crossStageStatic then " --disable-libssp --disable-nls" + " --without-headers" + " --disable-threads " + " --disable-libmudflap " + " --disable-libgomp " + - " --disable-shared" + " --disable-shared" + + " --disable-decimal-float" # libdecnumber requires libc else " --with-headers=${libcCross}/include" + " --enable-__cxa_atexit" + " --enable-long-long" + " --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 "-stage-final"; diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index 37ecda0e027..571484f0540 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -105,7 +105,6 @@ let arch = "sparc64"; float = "hard"; withTLS = true; - cpu = "ultrasparc"; libc = "glibc"; platform = { name = "ultrasparc"; @@ -118,6 +117,7 @@ let uboot = null; }; openssl.system = "linux64-sparcv9"; + gcc.cpu = "ultrasparc"; }; in { crossUltraSparcLinux = mapTestOnCross crossSystem basic;