diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 2e46253c8ed..084ced822c7 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -210,7 +210,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index a92b36c7236..a2a9f39a94e 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -216,7 +216,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 8f318e60e95..775245aae42 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -223,7 +223,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 3126747eb00..3f5644e9450 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -225,7 +225,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index b57215c9d6c..f780bfdfc76 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -202,7 +202,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 0859730534e..dc051d9c4b6 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -191,7 +191,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index 5abe01e36bb..57f4a72c135 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -190,7 +190,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped; diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 3c74a6d14e2..ef55806ce08 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -157,7 +157,7 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; buildFlags = optional - (hostPlatform == buildPlatform) + (targetPlatform == hostPlatform && hostPlatform == buildPlatform) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); dontStrip = !stripped;