diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 1ee052952010..324599e49821 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -208,7 +208,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 56860ca5cc66..9d4d8a9b6ac2 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -214,7 +214,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 5dc574d37023..d809c6c4e364 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -221,7 +221,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 a3030366be65..1eec43cb320a 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/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/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 49a43b337739..7a4b0ed32228 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -200,7 +200,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 9b36412efd4d..c0df37bd5f8f 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -184,7 +184,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 a5279504811d..23a5eeafb8b8 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -183,7 +183,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 286047a9f4aa..d073edfb09c8 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -155,7 +155,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;