about summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-12-30 16:38:38 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-12-30 16:38:38 +0100
commit6d059becd396ca8722904081cff7225bc64d5a44 (patch)
treee723580f3aa9aeec12d407dbea2c4a0fa1808c95 /pkgs/development/libraries/glibc/default.nix
parentbfa5af85b733defd158965fe91d60fd3f7a8a666 (diff)
parent59ab29fe88b06b31de5bea7ac11492a9dbc0c680 (diff)
Merge gcc-9 into staging (#68029)
Diffstat (limited to 'pkgs/development/libraries/glibc/default.nix')
-rw-r--r--pkgs/development/libraries/glibc/default.nix14
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")