diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-12-30 16:38:38 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-12-30 16:38:38 +0100 |
commit | 6d059becd396ca8722904081cff7225bc64d5a44 (patch) | |
tree | e723580f3aa9aeec12d407dbea2c4a0fa1808c95 /pkgs/development/libraries/glibc/default.nix | |
parent | bfa5af85b733defd158965fe91d60fd3f7a8a666 (diff) | |
parent | 59ab29fe88b06b31de5bea7ac11492a9dbc0c680 (diff) |
Merge gcc-9 into staging (#68029)
Diffstat (limited to 'pkgs/development/libraries/glibc/default.nix')
-rw-r--r-- | pkgs/development/libraries/glibc/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 2abc8b7ea668b..98e579cb7a6d6 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -5,6 +5,14 @@ , buildPackages }: +let + gdCflags = [ + "-Wno-error=stringop-truncation" + "-Wno-error=missing-attributes" + "-Wno-error=array-bounds" + ]; +in + callPackage ./common.nix { inherit stdenv; } { name = "glibc" + stdenv.lib.optionalString withGd "-gd"; @@ -47,10 +55,10 @@ callPackage ./common.nix { inherit stdenv; } { # 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.optionalString withGd "-Wno-error=stringop-truncation") + then (if withGd then gdCflags else null) else - builtins.toString (builtins.concatLists [ - (stdenv.lib.optional withGd "-Wno-error=stringop-truncation") + (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") |