From a3e35fbbe1fe9a3d117de69fb50f000ef5f4b312 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 5 Dec 2017 14:01:18 -0500 Subject: gcc: Use platformFlags in crossConfigureFlags A nice code deduplication --- pkgs/development/compilers/gcc/4.5/default.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'pkgs/development/compilers/gcc/4.5/default.nix') diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index ad605fdf268dc..5e19798c0fa99 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -85,20 +85,9 @@ let version = "4.5.4"; withFloat + withMode; - /* Cross-gcc settings */ - gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform; - gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatformt; - gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null targetPlatform; - 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 ""; - crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"); - crossConfigureFlags = "--target=${targetPlatform.config}" + - withArch + - withCpu + - withAbi + + platformFlags + # Ensure that -print-prog-name is able to find the correct programs. " --with-as=${binutils}/bin/${targetPlatform.config}-as" + " --with-ld=${binutils}/bin/${targetPlatform.config}-ld" + -- cgit 1.4.1