summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2019-11-03 13:32:45 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2019-11-03 14:43:36 +0100
commit4f411338d71d122611e9133254b1c5eb7ab10a03 (patch)
tree397d88c0bf8ddcab30a9a4a8a133ffe8d7402afd /pkgs/development/libraries/glibc
parent2e83bd66f613a675f5d49a364a745b75c3906df9 (diff)
downloadnixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.tar
nixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.tar.gz
nixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.tar.bz2
nixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.tar.lz
nixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.tar.xz
nixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.tar.zst
nixpkgs-4f411338d71d122611e9133254b1c5eb7ab10a03.zip
glibc_memusage: fix build with gcc9
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r--pkgs/development/libraries/glibc/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index 50b359da96c..6115611b42e 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 (if withGd then "-Wno-error=stringop-truncation" else null)
+        then (if withGd then gdCflags else null)
         else
           builtins.concatLists [
-            (stdenv.lib.optional withGd "-Wno-error=stringop-truncation")
+            (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")