diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-05 14:01:18 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-05 14:01:18 -0500 |
commit | a3e35fbbe1fe9a3d117de69fb50f000ef5f4b312 (patch) | |
tree | 9ac2c59eb92c08b9281ddba7014f85770e05fc11 /pkgs/development/compilers/gcc/4.5/default.nix | |
parent | 1fe9798ac23e9be70553ba20a37fc32aa4f98f7f (diff) |
gcc: Use platformFlags in crossConfigureFlags
A nice code deduplication
Diffstat (limited to 'pkgs/development/compilers/gcc/4.5/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/4.5/default.nix | 13 |
1 files changed, 1 insertions, 12 deletions
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" + |