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: f73e006509c8
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: def9d0980684
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 30, 2019

  1. glibc: Fix building with musl on GCC 8.

    GCC 8 introduced new warnings that were picked up by -Werror;
    this commit makes them non-errors until fixed upstream.
    
    See
    
    * #68244 (comment)
    * nh2/static-haskell-nix#56
    
    This commit takes care to not change the derivation for non-musl builds.
    nh2 committed Oct 30, 2019
    Copy the full SHA
    08ec575 View commit details

Commits on Oct 31, 2019

  1. Merge pull request #71480 from nh2/glibc-musl-gcc8-werror-fixes

    glibc: Fix building with musl on GCC 8
    nh2 authored Oct 31, 2019
    Copy the full SHA
    def9d09 View commit details
Showing with 16 additions and 2 deletions.
  1. +1 −1 pkgs/development/libraries/glibc/common.nix
  2. +15 −1 pkgs/development/libraries/glibc/default.nix
2 changes: 1 addition & 1 deletion pkgs/development/libraries/glibc/common.nix
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ stdenv.mkDerivation ({
++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch

# Remove after upgrading to glibc 2.28+
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) (fetchpatch {
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform || stdenv.hostPlatform.isMusl) (fetchpatch {
url = "https://sourceware.org/git/?p=glibc.git;a=patch;h=780684eb04298977bc411ebca1eadeeba4877833";
name = "correct-pwent-parsing-issue-and-resulting-build.patch";
sha256 = "08fja894vzaj8phwfhsfik6jj2pbji7kypy3q8pgxvsd508zdv1q";
16 changes: 15 additions & 1 deletion pkgs/development/libraries/glibc/default.nix
Original file line number Diff line number Diff line change
@@ -40,7 +40,21 @@ callPackage ./common.nix { inherit stdenv; } {
# limit rebuilds by only disabling pie w/musl
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";

NIX_CFLAGS_COMPILE = if withGd then "-Wno-error=stringop-truncation" else null;
NIX_CFLAGS_COMPILE =
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 (if withGd then "-Wno-error=stringop-truncation" else null)
else
builtins.concatLists [
(stdenv.lib.optional withGd "-Wno-error=stringop-truncation")
# 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")
];

# 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