Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 961d0cf9f5f5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5e515242936c
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jan 11, 2020

  1. glibc: remove TODO that is now done

    This was preventing a mass-rebuild by returning null. As of
    5f2d96b it always returns a string.
    thefloweringash committed Jan 11, 2020
    Copy the full SHA
    569f052 View commit details
  2. Copy the full SHA
    5101476 View commit details
  3. Merge pull request #76972 from thefloweringash/cross-glibc-warnings

    glibc: fix cross compilation build failure
    flokli authored Jan 11, 2020
    Copy the full SHA
    5e51524 View commit details
5 changes: 5 additions & 0 deletions pkgs/development/libraries/glibc/common.nix
Original file line number Diff line number Diff line change
@@ -97,6 +97,11 @@ stdenv.mkDerivation ({
./CVE-2018-11236.patch
# https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f51c8367685dc888a02f7304c729ed5277904aff
./CVE-2018-11237.patch

# Remove after upgrading to glibc 2.28+
# Change backported from upstream
# https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c79cec8cd2a6996a73aa83d79b360ffd4bebde6
./fix-out-of-bounds-access-in-findidxwc.patch
]
++ lib.optionals stdenv.isx86_64 [
./fix-x64-abi.patch
25 changes: 11 additions & 14 deletions pkgs/development/libraries/glibc/default.nix
Original file line number Diff line number Diff line change
@@ -49,20 +49,17 @@ callPackage ./common.nix { inherit stdenv; } {
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";

NIX_CFLAGS_COMPILE = stdenv.lib.concatStringsSep " "
(if !stdenv.hostPlatform.isMusl
# TODO: This (returning a string or `null`, instead of a list) is to
# not trigger a mass rebuild due to the introduction of the
# musl-specific flags below.
# At next change to non-musl glibc builds, remove this `then`
# and the above condition, instead keeping only the `else` below.
then (stdenv.lib.optionals withGd gdCflags)
else
(builtins.concatLists [
(stdenv.lib.optionals withGd gdCflags)
# Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
# https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
(stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
]));
(builtins.concatLists [
(stdenv.lib.optionals withGd gdCflags)
# Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
# https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
(stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
(stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# Ignore "error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location'"
# New warning as of GCC 9
"-Wno-error=missing-attributes"
])
]);

# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
# any program we run, because the gcc will have been placed at a new
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff -ur glibc-2.27/locale/weightwc.h glibc-2.27-patched/locale/weightwc.h
--- glibc-2.27/locale/weightwc.h 2018-02-02 01:17:18.000000000 +0900
+++ glibc-2.27-patched/locale/weightwc.h 2020-01-12 03:33:41.519720579 +0900
@@ -73,7 +73,7 @@
break;
DIAG_POP_NEEDS_COMMENT;

- if (cnt == nhere)
+ if (cnt == nhere || cnt == len)
{
/* Found it. */
*cpp += nhere;
@@ -100,13 +100,13 @@
continue;
}

- if (cp[nhere - 1] > usrc[nhere -1])
+ if (cp[nhere - 1] > usrc[nhere - 1])
{
cp += 2 * nhere;
continue;
}

- if (cp[2 * nhere - 1] < usrc[nhere -1])
+ if (cp[2 * nhere - 1] < usrc[nhere - 1])
{
cp += 2 * nhere;
continue;