diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 36b48b88021..70fbefb898e 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 dea8b912b27..1fcad756eec 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 343d820fa23..009f28dc66b 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 0d9565de0a7..a695b6819a1 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 29f2bad7eac..c5ca1060894 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 e75e22efce1..9a0da5dbf6e 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 609d418693d..fcfc8f15f13 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.