diff --git a/pkgs/development/libraries/glibc-2.12/default.nix b/pkgs/development/libraries/glibc-2.12/default.nix index a57996ff35d7..89e8c60b7dad 100644 --- a/pkgs/development/libraries/glibc-2.12/default.nix +++ b/pkgs/development/libraries/glibc-2.12/default.nix @@ -4,6 +4,7 @@ , installLocales ? true , profilingLibraries ? false , gccCross ? null +, debugSymbols ? false }: assert stdenv.gcc.gcc != null; @@ -13,7 +14,7 @@ let cross = if gccCross != null then gccCross.target else null; in build cross ({ - name = "glibc"; + name = "glibc${if debugSymbols then "-debug" else ""}"; inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries gccCross; @@ -39,6 +40,18 @@ in // + (if debugSymbols + then { + # Build with debugging symbols, but leave optimizations on and don't + # attempt to keep the build tree. + dontStrip = true; + dontCrossStrip = true; + NIX_STRIP_DEBUG = 0; + } + else {}) + + // + (if hurdHeaders != null then rec { inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit;