glibc: make NIX_CFLAGS_COMPILE a string
This commit is contained in:
parent
e4da6854a0
commit
95a1614a9f
@ -48,21 +48,21 @@ callPackage ./common.nix { inherit stdenv; } {
|
|||||||
# limit rebuilds by only disabling pie w/musl
|
# limit rebuilds by only disabling pie w/musl
|
||||||
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
|
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE = stdenv.lib.concatStringsSep " "
|
||||||
if !stdenv.hostPlatform.isMusl
|
(if !stdenv.hostPlatform.isMusl
|
||||||
# TODO: This (returning a string or `null`, instead of a list) is to
|
# TODO: This (returning a string or `null`, instead of a list) is to
|
||||||
# not trigger a mass rebuild due to the introduction of the
|
# not trigger a mass rebuild due to the introduction of the
|
||||||
# musl-specific flags below.
|
# musl-specific flags below.
|
||||||
# At next change to non-musl glibc builds, remove this `then`
|
# At next change to non-musl glibc builds, remove this `then`
|
||||||
# and the above condition, instead keeping only the `else` below.
|
# and the above condition, instead keeping only the `else` below.
|
||||||
then (if withGd then gdCflags else null)
|
then (stdenv.lib.optionals withGd gdCflags)
|
||||||
else
|
else
|
||||||
(builtins.concatLists [
|
(builtins.concatLists [
|
||||||
(stdenv.lib.optionals withGd gdCflags)
|
(stdenv.lib.optionals withGd gdCflags)
|
||||||
# Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
|
# Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
|
||||||
# https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
|
# https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
|
||||||
(stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
|
(stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
|
||||||
]);
|
]));
|
||||||
|
|
||||||
# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
|
# 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
|
# any program we run, because the gcc will have been placed at a new
|
||||||
|
Loading…
x
Reference in New Issue
Block a user