about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-09-17 17:55:02 -0400
committerGitHub <noreply@github.com>2019-09-17 17:55:02 -0400
commit3736220b5bd693a47b9823388d3671f4f0b3c6e3 (patch)
tree4e514fff117f8760b58e743c7b9561a1b8d2c57c
parentb6ad762f9c43ba1d46a46d1ccf2634cf41bdd12a (diff)
parent3fcc4441d7ab18d10694a3dce3c8644339bcaf9d (diff)
downloadnixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.tar
nixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.tar.gz
nixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.tar.bz2
nixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.tar.lz
nixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.tar.xz
nixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.tar.zst
nixlib-3736220b5bd693a47b9823388d3671f4f0b3c6e3.zip
Merge pull request #68930 from matthewbauer/fix-cross-glibc
glibc: fix cross compilation with gcc8
-rw-r--r--pkgs/development/libraries/glibc/common.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 33c8e5076daa..8e8e445f0173 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -19,7 +19,7 @@
 
 { stdenv, lib
 , buildPackages
-, fetchurl ? null
+, fetchurl, fetchpatch
 , linuxHeaders ? null
 , gd ? null, libpng ? null
 , bison
@@ -95,7 +95,15 @@ stdenv.mkDerivation ({
     ]
     ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch
     ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch
-    ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch;
+    ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch
+
+    # Remove after upgrading to glibc 2.28+
+    ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchpatch {
+      url = "https://sourceware.org/git/?p=glibc.git;a=patch;h=780684eb04298977bc411ebca1eadeeba4877833";
+      name = "correct-pwent-parsing-issue-and-resulting-build.patch";
+      sha256 = "08fja894vzaj8phwfhsfik6jj2pbji7kypy3q8pgxvsd508zdv1q";
+      excludes = [ "ChangeLog" ];
+    });
 
   postPatch =
     ''