diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 0482ff772d6c..3e20cade8ae3 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -151,12 +151,7 @@ stdenv.mkDerivation ({ ; postPatch = - if (stdenv.system == "i586-pc-gnu" - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (targetPlatform != hostPlatform && targetPlatform.config == "i586-pc-gnu" - && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string. diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 060683860709..79e4c82852bd 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -193,11 +193,7 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; postPatch = - if (hostPlatform.isHurd - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (crossGNU && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string. diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 1fab985473ea..4936a6a3a9a9 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -188,11 +188,7 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; postPatch = - if (hostPlatform.isHurd - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (crossGNU && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string. diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 6e3e7d0b0993..79dcb67ff72b 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -204,11 +204,7 @@ stdenv.mkDerivation ({ ''; postPatch = - if (hostPlatform.isHurd - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (crossGNU && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string. diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 67b7cf61c5ae..857f9e1a2b63 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -204,11 +204,7 @@ stdenv.mkDerivation ({ ''; postPatch = - if (hostPlatform.isHurd - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (crossGNU && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string. diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 2a034954f73c..a3435cc4f167 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -204,11 +204,7 @@ stdenv.mkDerivation ({ ''; postPatch = - if (hostPlatform.isHurd - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (crossGNU && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string. diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 693474bfb5e1..884bccd37f04 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -183,11 +183,7 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" ]; postPatch = - if (hostPlatform.isHurd - || (libcCross != null # e.g., building `gcc.crossDrv' - && libcCross ? crossConfig - && libcCross.crossConfig == "i586-pc-gnu") - || (crossGNU && libcCross != null)) + if targetPlatform.isHurd then # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not # in glibc, so add the right `-I' flags to the default spec string.