summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-12-31 09:16:53 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-12-31 09:16:53 +0100
commit95a1614a9f8985d8cc2f166fa61d7954754e629b (patch)
tree014d0a4ba4cb2c833a281c6bde9893c0b4c003cc /pkgs/development/libraries/glibc
parente4da6854a0372dc9b6a92ea1c11a5c5ca133bcda (diff)
downloadnixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.tar
nixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.tar.gz
nixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.tar.bz2
nixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.tar.lz
nixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.tar.xz
nixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.tar.zst
nixpkgs-95a1614a9f8985d8cc2f166fa61d7954754e629b.zip
glibc: make NIX_CFLAGS_COMPILE a string
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r--pkgs/development/libraries/glibc/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix
index 98e579cb7a6..1a17595a1a3 100644
--- a/pkgs/development/libraries/glibc/default.nix
+++ b/pkgs/development/libraries/glibc/default.nix
@@ -48,21 +48,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 !stdenv.hostPlatform.isMusl
+    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 (if withGd then gdCflags else null)
+        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")
-          ]);
+          ]));
 
     # 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