From 3a9654bfe29ebd987b7426faa25f00af1fab02c5 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 14 May 2018 13:13:11 -0400 Subject: [PATCH] gcc: Simplify this old Hurd condition Steps towards getting rid of crossConfig. --- pkgs/development/compilers/gcc/4.5/default.nix | 7 +------ pkgs/development/compilers/gcc/4.8/default.nix | 6 +----- pkgs/development/compilers/gcc/4.9/default.nix | 6 +----- pkgs/development/compilers/gcc/5/default.nix | 6 +----- pkgs/development/compilers/gcc/6/default.nix | 6 +----- pkgs/development/compilers/gcc/7/default.nix | 6 +----- pkgs/development/compilers/gcc/snapshot/default.nix | 6 +----- 7 files changed, 7 insertions(+), 36 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 36b48b880211aa..70fbefb898e8ac 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 dea8b912b272ee..1fcad756eec108 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 343d820fa236a1..009f28dc66b140 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 0d9565de0a7776..a695b6819a1a9c 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 29f2bad7eac11c..c5ca1060894b84 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 e75e22efce1f55..9a0da5dbf6eba1 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 609d418693d7b5..fcfc8f15f13233 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.