diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-11-29 22:22:11 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2017-11-29 23:09:17 +0200 |
commit | d7a0695c43f5b27329aef96bc4fd3e31427228f5 (patch) | |
tree | 73c061f387f9ae51731a368a1ef878d9bf63ae9c /pkgs/development/compilers/gcc | |
parent | 825b953bf575b4248ee57980362387c91be0f4c3 (diff) | |
download | nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.tar nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.tar.gz nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.tar.bz2 nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.tar.lz nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.tar.xz nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.tar.zst nixlib-d7a0695c43f5b27329aef96bc4fd3e31427228f5.zip |
gcc7: Reduce diff to gcc6
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index c75472e73008..151dc96b2426 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -430,7 +430,7 @@ stdenv.mkDerivation ({ CC_FOR_TARGET = "${targetPlatform.config}-gcc"; NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; - # If we are making a cross compiler, cross != null + # If we are making a cross compiler, targetPlatform != hostPlatform NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index c201ca6373b7..7335c784a957 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -105,7 +105,7 @@ let version = "7.2.0"; gccFpu = platform.gcc.fpu or null; gccFloat = platform.gcc.float or null; gccMode = platform.gcc.mode or null; - in + in optional (gccArch != null) "--with-arch=${gccArch}" ++ optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ optional (gccAbi != null) "--with-abi=${gccAbi}" ++ @@ -426,7 +426,7 @@ stdenv.mkDerivation ({ NM_FOR_TARGET = "${targetPlatform.config}-nm"; CXX_FOR_TARGET = "${targetPlatform.config}-g++"; # If we are making a cross compiler, targetPlatform != hostPlatform - NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; + NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; dontStrip = true; configureFlags = optional (!enableMultilib) "--disable-multilib" ++ |